# nginx/Win2008R2 stops responding after few sessions

**URL:** <https://www.ruby-forum.com/t/nginx-win2008r2-stops-responding-after-few-sessions/214708>\
**Category:** NGINX\
**Created:** [December 9, 2011, 6:05pm UTC](https://www.ruby-forum.com/t/nginx-win2008r2-stops-responding-after-few-sessions/214708 "2011-12-09T18:05:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [December 9, 2011, 6:05pm UTC](https://www.ruby-forum.com/t/nginx-win2008r2-stops-responding-after-few-sessions/214708/1 "2011-12-09T18:05:38Z")

</div>

Hello,

I am running nginx 1.0.10 (native build) on Windows 2008 R2 with 2  
worker  
processes.

I am serving a static file (chunk.ts 375000 bytes) to a httperf client  
running on CentOS 6. The client executes 4 concurrent connections and  
sends  
out 96 requests on each. The client has a response timeout set at 2  
seconds. In the first execution of the client all 4 sessions succeed but  
in  
the second execution 2 sessions timeout due the lack of a response. In  
the  
third & fourth execution all sessions timeout.

I have some debug data available at  
[nginxnoresp](http://www.mediafire.com/?yct3s1720flgvz3). The archive contains

chunk.ts - the static file being served  
error.log - nginx error log (debug level)  
httperfout.txt - output of httperf executions  
NetworkMonitor.cap - Packet capture from nginx server (using Network  
Monitor)  
nginx.conf - nginx conf used

The network capture shows TCP ACK for the request but no response from  
nginx during 2 seconds. The nginx log shows 6 successfult sessions but  
nothing much after that. If the server is restarted a few sessions would  
succeed before it stops responding.

And importantly, there is no problem when the number of worker processes  
is  
set to 1.

Would you have any additional clues about what is going wrong?

Thanks  
Kurien

---

<div class="post-metadata">

**Author:** ![Kurien\_Mathew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/4af34b/32.png) [@Kurien\_Mathew](https://www.ruby-forum.com/u/Kurien_Mathew)\
**Post date:** [December 9, 2011, 7:13pm UTC](https://www.ruby-forum.com/t/nginx-win2008r2-stops-responding-after-few-sessions/214708/2 "2011-12-09T19:13:45Z")

</div>

On Friday 09 December 2011 21:05:12 Kurien Mathew wrote:

> I am running nginx 1.0.10 (native build) on Windows 2008 R2 with 2 worker  
> processes.  
> […]
> 
> And importantly, there is no problem when the number of worker processes is  
> set to 1.
> 
> Would you have any additional clues about what is going wrong?

So, just set the worker\_processes directive to 1.

Setting worker\_processes \> 1 is meaningless on windows due to  
limitations:

> **[nginx for Windows](http://nginx.org/en/docs/windows.html#known_issues)**
>
> Version of nginx for Windows uses the native Win32 API (not the Cygwin emulation layer). Only the select() and poll() (1.15.9) connection processing methods are currently used, so high performance and scalability should not be expected. Due to this...

wbr, Valentin V. Bartenev

---

<div class="post-metadata">

**Author:** ![Kurien\_Mathew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/4af34b/32.png) [@Kurien\_Mathew](https://www.ruby-forum.com/u/Kurien_Mathew)\
**Post date:** [December 9, 2011, 8:21pm UTC](https://www.ruby-forum.com/t/nginx-win2008r2-stops-responding-after-few-sessions/214708/3 "2011-12-09T20:21:16Z")

</div>

Hello!

On Fri, Dec 09, 2011 at 06:05:12PM +0100, Kurien Mathew wrote:

> third & fourth execution all sessions timeout.
> 
> The network capture shows TCP ACK for the request but no response from  
> nginx during 2 seconds. The nginx log shows 6 successfult sessions but  
> nothing much after that. If the server is restarted a few sessions would  
> succeed before it stops responding.
> 
> And importantly, there is no problem when the number of worker processes is  
> set to 1.
> 
> Would you have any additional clues about what is going wrong?

The worker\_processes under windows must be set to 1 or you must  
switch off accept\_mutex. In either case only one worker will  
actually do any work.

Maxim D.

---

<div class="post-metadata">

**Author:** ![Kurien\_Mathew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/4af34b/32.png) [@Kurien\_Mathew](https://www.ruby-forum.com/u/Kurien_Mathew)\
**Post date:** [December 9, 2011, 11:17pm UTC](https://www.ruby-forum.com/t/nginx-win2008r2-stops-responding-after-few-sessions/214708/4 "2011-12-09T23:17:29Z")

</div>

I am aware of the limitations. I had two objectives in mind when  
attempting  
more than one worker process:

1. See if it would be possible to have more than 1024 sessions
2. Help in the identification of a probable bug.

Kurien
