Understood with a question. The point was that the Rabbit was written in erlang . In the fine language erlang the garbage collector in a virtual machine works with old and not very efficient algorithms. He begins to clean the memory only when it ends. However, there are ways to explicitly indicate when it starts.
Thus, through the RabbitMQ settings you can reach the Erlang virtual machine. To do this, you need to create (if it does not exist) the file /etc/rabbitmq/rabbitmq.config (Debian, Ubuntu) . It can specify the percentage of total memory or a specific amount, telling when to start the garbage collector. It should be remembered that it is not RAM that is taken into account, but virtual (!). I did 20% of the total virtual memory like this:
[{rabbit, [{vm_memory_high_watermark, 0.2}]}].
My problem was that the default value is 0.4, which is too much for a busy server in production ...
You can make sure that the limit of consumed virtual memory does not exceed the norm is possible with the command sudo rabbitmqctl status . vm_memory_limit parameter: vm_memory_limit .
VIRTvalue was about 2,000,000, now 4330792. - faoxis