[zeromq-dev] Too many open files (signaler.cpp:330)

Martin Sustrik sustrik at 250bpm.com
Wed Jan 4 14:21:26 CET 2012

Hi Chuck,

> I need some guidance on how to figure out why I am getting this
> assertion (0mq 2.1.11). I assume it is due to running out of file
> descriptors, but it's happening in a place (socketpairs) where I
> thought the code was eliminated. That is, I didn't think 0mq used
> socketpairs for internal communication anymore after about version
> 2.1.5 or so.

It's still based on socketpairs, however, not it's only a singal (1 
byte) being passed through the socketpair instead of the whole command.

> This is on OSX. I have the open file limit set to 400k. I have
> modified src/config.hpp MAX_SOCKETS to be 51200. I get this assertion
> after opening around 2800 0mq sockets and closing 1500 of them, so I
> am *nowhere near* the FD limit or the max socket limit.

That's strange. 2800 sockets should use 5600 fds for socketpairs + the 
fds for the actual connections etc.

> Any suggestions on a printf I could add to the library to help narrow
> down the cause of this?



More information about the zeromq-dev mailing list