-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flood publishing causes socket to be nil #100
Comments
RabbitMQ will block publishers that overrun consumers. In theory it should not cause any socket exceptions but presumably it does. Network error handling is very simplistic right now, it is true. |
Can you count after about what # of messages published you get this behavior? And post what's in the RabbitMQ log? Thanks! |
Also, what's approximate median message size? So far I cannot reproduce this with small messages (1K) and |
Does not reproduce the issue for me
It happens at about 270K messages. Some other details about my environment:
The message size doesn't really seems to matter. It happens even with 4B messages. These are the last lines in my Rabbit logs: =INFO REPORT==== 15-Feb-2013::10:30:55 === =INFO REPORT==== 15-Feb-2013::10:30:56 === =ERROR REPORT==== 15-Feb-2013::10:30:56 === |
That means RabbitMQ somehow gets an empty frame header, considers it a fatal error and closes the connection. |
Yes, the script I posted in the first message reproduces the issue when there is a durable queue subscribed to the exchange. |
Can you check that RabbitMQ log does not have anything related to alarms when this happens? I cannot reproduce this. My theory is that when your machine goes low on memory or disk space (< 1 GB), RabbitMQ blocks the publisher, eventually OS socket buffer gets full and this results in exceptions |
Setting RabbitMQ memory watermark to a really low value suggests it is not the issue:
will cause the publisher quickly get blocked but it does not cause the script to fail with any exceptions. |
I can't reproduce it across 2 OSes, 2 RabbitMQ versions, 2 Ruby implementations. We have a test for a very |
|
There seems to be some kind of concurrency issues when I try to write a hell lot of messages locally. I've managed to reproduce the error by just running this code:
after a while you will get this error:
which comes continuously given that the Exception is swallowed in the main_loop
I've managed to avoid the error by setting single threaded true:
The text was updated successfully, but these errors were encountered: