<div dir="ltr">Thanks Maxim for the info. So worker  connections in waiting state may not be<div>ready to be reused. Is there any maximum waiting time? We seem to run into</div><div>a condition that those connections are permanently stuck in waiting state.</div><div><br></div><div>Also, what would be the ball-park number of <span style="font-size:16px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">worker_connections<span>  should be set </span></span></div><div><span style="font-size:16px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span>if we want to support <span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">expected number of active connections, say 150?  </span></span></span></div><div><span style="font-size:16px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Thanks,</span></span></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 27, 2018 at 4:56 AM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<span class=""><br>
On Fri, Aug 24, 2018 at 02:54:31PM -0700, Alder Netw wrote:<br>
<br>
> Got a question regarding the worker_connections configuration. Is a<br>
> worker_connection<br>
> essentially<br>
> a tcp socket connection or http session?<br>
<br>
</span>The worker_connections directive configures maximum number of <br>
connections a worker process can open.  That is, basically this <br>
means "TCP sockets".<br>
<br>
See <a href="http://nginx.org/r/worker_connections" rel="noreferrer" target="_blank">http://nginx.org/r/worker_<wbr>connections</a> for additional details.<br>
<span class=""><br>
> Via the http_stub_status_module, I can see there are<br>
> connections in waiting state, but any new request<br>
> will result in a "worker connections are not enough"<br>
> alert in error.log. Why it cannot accept new connections<br>
> if there are existing connections in waiting state? Is that<br>
> a bug? I am using nginx 1.6.2.<br>
<br>
</span>Connections in the waiting state are real established connections.  <br>
While in some cases nginx can close and re-use these connections <br>
quickly enough to don't trigger the "worker connections are not <br>
enough" alert, this is not something guaranteed.<br>
<br>
In general, you should tune worker_connections so it's higher than <br>
expected number of active connections - that is, all connections <br>
including waiting ones.<br>
<span class="HOEnZb"><font color="#888888"><br>
-- <br>
Maxim Dounin<br>
<a href="http://mdounin.ru/" rel="noreferrer" target="_blank">http://mdounin.ru/</a><br>
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
</font></span></blockquote></div><br></div>