# Worker Connections not being released

**URL:** <https://www.ruby-forum.com/t/worker-connections-not-being-released/233227>\
**Category:** NGINX\
**Created:** [November 25, 2014, 9:46pm UTC](https://www.ruby-forum.com/t/worker-connections-not-being-released/233227 "2014-11-25T21:46:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [November 25, 2014, 9:46pm UTC](https://www.ruby-forum.com/t/worker-connections-not-being-released/233227/1 "2014-11-25T21:46:06Z")

</div>

Hello all,  
I have been developing an nginx module that allows the sending of zeromq  
messages through nginx (inspired by  
[GitHub - FRiCKLE/ngx\_zeromq: ZeroMQ transport for nginx](https://github.com/FRiCKLE/ngx_zeromq)).  
The code base for this can be found here:  
[GitHub - neloe/ngx\_zmq: An upstream ZeroMQ module for nginx](https://github.com/neloe/ngx_zmq)

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

location /zmq/{  
zmq\_endpoint “tcp://localhost:5555”;  
zmq;  
}

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
