[zeromq-dev] Interrupted System Call: advice to handle it
Raphael Bauduin
rblists at gmail.com
Wed Jul 4 12:05:53 CEST 2012
Hi,
I'm using the ruby zmq bindings in a web application. I regularly get
error message "ZMQ::Error: Interrupted system call" related to a send.
This is in a Ruby on Rails application served with passenger, which
spawns worker processes. I think I have identified a process that
generated this error, and an strace on it shows no activity at all.
This process however keeps open a connection to the mysql server. An
accumulation of such errors will eventually become problematic server
side, in addition to clients getting an error page and messages being
lost.
I'm looking for advice in avoiding this error and possibly for further
debugging hints. Related to that I have several questions:
- Should I simply catch this exception, and retry the send if needed?
As this is done in the process sending the page content back to the
client, won't it possibly make some requests too slow? (This could
still be better than an error as we have currently)
- If my understanding is correct, the problem occurs with blocking
syscalls, and requests having the error don't return any content to
the client. But what happens if I make the send non blocking?
(http://zeromq.github.com/rbzmq/classes/ZMQ/Socket.html#M000010)
- Finally, what might interrupt the syscall? Any interesting read about this?
Thanks in advance
Raph
More information about the zeromq-dev
mailing list