Hey there.
tl;dr:When distributing messages on a stream queue, our RabbitMQ server eats up every open file descriptor it has, then starts crashing.
It seems to be related to my clients. While I keep my 46 clients up, the number of open file handles rises up to 32k. Once I kill my clients, the number of open file handles gets back to almost 0.
We're running RabbitMQ 3.10.5 on Erlang 23.2.3 in conjunction with corresponding Stream plugin.
We have 25 queues.
One is a stream queue, 24 are non-stream queues.
We have 46 connections.
23 target the stream queue, 23 target a single non-stream queue each.
This stream queue currently holds 600'000 messages up to seven days,
which fits in a single segment file.
It's a single server. No cluster, no quorum.
My client is PHP, its code is based on php-amqplib/discussions.
I do not put the last seem message ID into the queue. The documentation tells me this wouldn't be a good idea and I do have local storage available.
It seems like whenever a connection to the stream queue handles a message, the RabbitMQ server adds at least one additional file descriptor to the single segment file.
After after some (depending on the load, obviously), the RabbitMQ server has 32k open file handles to the same segment file. Then it starts carshing.
When I close/shutdown all my clients, the number of open file handles goes back to about 50.
My clients usually have a single loop in PHP connecting to the RabbitMQ server, which can be seen via lsof.
The PHP client takes a message from Rabbit and issues another PHP script via exec(). As of how the framework I'm using works, this spawns a sh process which spawns a php process.
I can see (via lsof) that my TCP connection is present in the parent process (the script which is my loop connected to the RabbitMQ server), is not present in the sh process, but is present in the inner php process which just takes the message via command line argument and handles it without needing to interact with Rabbit.
lsof tells me it is the very same connection by showing me the exact same host:port->host:port line on both, the outer php process as well as the inner php process.
I have no clue what's going on here. It's not like my clients opened new connections per message. That's just not the case. The one TCP connection my main loop holds stays the same until I manually close it, lsof shows me it's the very same. The number of connections to RabbitMQ don't increase at all (as of what the web interface tells me) but my open file descriptors keep climbing.
Any help would be appreciated. My gut tells me increasing the number of allowed open file handles isn't gonna solve my problem.
Regards,
Stephan.
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/36aeb145-70fc-47b5-bc43-d2363a7dd4c5n%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/0525ba55-f7a5-4bef-a1f3-f9b5cb590084n%40googlegroups.com.