Worker Connections not being released

Nathan Eloe powerofazure at
Tue Nov 25 20:45:19 UTC 2014

Hello all,
I have been developing an nginx module that allows the sending of zeromq
messages through nginx (inspired by
The code base for this can be found here:

However, I'm running into an issue where when running with a minimal
location configuration of

location /zmq/{
            zmq_endpoint "tcp://localhost:5555";

I am testing the location with the following curl command:
curl -s localhost:8080/zmq/ -X POST -d "hello"

with 256 worker_connections, 1 worker_process, and keepalive_timeout of 0,
requests to the location will start failing after 254 requests.

Increasing to 1024 worker_connections does not solve the problem, but
allows me to send 1022 requests before the following begins appearing in my
error log:

2014/11/25 14:25:27 [alert] 10732#0: 1024 worker_connections are not enough

Explicitly disabling keepalive/lingering connections does not seem to solve
the problem; it feels like something somewhere is grabbing the worker
connection and never releasing it.

I have tried building the module against nginx 1.5.12, 1.7.4 and 1.7.7.
The older two versions are because they are the versions of openresty I am
trying to use this module in conjunction with.

Any guidance as to what would be causing these connections to never be
released would be very welcome.

Thank you,
Nathan Eloe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list