Creating many Sockets in ZMQ - too many files error

Viewed 1788

I am trying to create sockets with inproc:// transport class from the same context in C.

I can create 2036 sockets, when I try to create more zmq_socket() returns NULL and the zmq_errno says 24 'Too many open files'.

How can I create more than 2036 sockets? Especially as inproc forces me to use only one context.

There are several things I don't understand:
- the sockets are eventually turned to inproc, why does it take up files?
- Increasing ZMQ_MAX_SOCKETS does not help, the system file limit appears to be the limiting factor
- I am unable to increase the file limit with ulimit on my Mac, no workaround helped.

// the code is actually in cython and can be found here:

https://github.com/DavoudTaghawiNejad/ABsinthCE

3 Answers
Related