O
O
oni__ino2016-06-06 17:36:50
linux
oni__ino, 2016-06-06 17:36:50

High CPU usage rabbitmq service?

Good day. Things like this are worrying.
There is a server in the google cloud (~ 1vcpu 4Gb ram 20Gb ssd) one project is deployed on it (nginx, php, rabbitmq, amqp) and in general for quite some time the cpu load on this instance has not dropped below 100%, looking at htop it turns out that 75 % is occupied by the beam / rabbitmq process, the question is, is this normal?
As long as the project is not heavily visited, and the pages open quickly, the site works, but if you add loads with such use of resources, there may be problems, it seems to me. Moreover, the rabbit is so calm in the gui, without queues and without any visible load.
The guys say yes, forget it, he likes to eat resources like that, but what can you tell me? In the configs on the main site I saw that it is fashionable to limit memory (with this it is just fine there), I did not find anything about cpu.
Necessary information:

Status of node 'XXX' ...
[{pid,1920},
 {running_applications,
     [{rabbitmq_management,"RabbitMQ Management Console","3.5.4"},
      {rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.5.4"},
      {webmachine,"webmachine","1.10.3-rmq3.5.4-gite9359c7"},
      {mochiweb,"MochiMedia Web Server","2.7.0-rmq3.5.4-git680dba8"},
      {rabbitmq_management_agent,"RabbitMQ Management Agent","3.5.4"},
      {rabbit,"RabbitMQ","3.5.4"},
      {os_mon,"CPO  CXC 138 46","2.2.9"},
      {inets,"INETS  CXC 138 49","5.9"},
      {amqp_client,"RabbitMQ AMQP Client","3.5.4"},
      {xmerl,"XML parser","1.3.1"},
      {mnesia,"MNESIA  CXC 138 12","4.7"},
      {sasl,"SASL  CXC 138 11","2.2.1"},
      {stdlib,"ERTS  CXC 138 10","1.18.1"},
      {kernel,"ERTS  CXC 138 10","2.15.1"}]},
 {os,{unix,linux}},
 {erlang_version,
     "Erlang R15B01 (erts-5.9.1) [source] [64-bit] [async-threads:64] [kernel-poll:true]\n"},
 {memory,
     [{total,34621536},
      {connection_readers,132568},
      {connection_writers,71600},
      {connection_channels,131904},
      {connection_other,120880},
      {queue_procs,234792},
      {queue_slave_procs,0},
      {plugins,625760},
      {other_proc,8794366},
      {mnesia,72992},
      {mgmt_db,978432},
      {msg_index,45856},
      {other_ets,1121424},
      {binary,21928},
      {code,18600771},
      {atom,703377},
      {other_system,2964886}]},
 {alarms,[]},
 {listeners,[{clustering,25672,"::"},{amqp,5672,"::"}]},
 {vm_memory_high_watermark,0.4},
 {vm_memory_limit,1556806041},
 {disk_free_limit,50000000},
 {disk_free,6428037120},
 {file_descriptors,
     [{total_limit,924},{total_used,9},{sockets_limit,829},{sockets_used,7}]},
 {processes,[{limit,1048576},{used,239}]},
 {run_queue,0},
 {uptime,10116559}]

Well, here is a frequently encountered report
rabbitmqctl report | grep -A3 file_descriptors
 {file_descriptors,
     [{total_limit,924},{total_used,9},{sockets_limit,829},{sockets_used,7}]},
 {processes,[{limit,1048576},{used,239}]},

Thanks to all!
UPD: thanks again for the links, I tried to update because rebooting the rabbit itself did not solve the problem
erlang version 1:18
rabbitmq-server version 3.6.2-1
while the flight is normal, the day has passed, the load is at 10%
UPD2: Probably a week or a little has passed more, as everything again did not start over again. The new version of rabbit is no longer cured by a reboot.
1d1c806f448b4e53a80e75319174ccd9.png
there is no alternative way except to climb into the process itself?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2016-06-06
@begemot_sun

Well, you can get into the Erlang console and see which process is eating a lot of CPU time, then draw some conclusions.

M
mamont801, 2016-06-18
@mamont801

I had the same thing several times under windows on a home machine. Happened after waking up from sleep mode. RabbitMQ ate a lot of CPU and for a long time. It was treated with a reboot. I'll say a banality, but have you tried turning it off and on?

I
itcoder, 2016-06-18
@itcoder

мне кажется вот ответ на ваш вопрос, попробуйте stackoverflow.com/questions/25162484/rabbitmq-beam...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question