# Transforming nginx for Windows

**URL:** <https://www.ruby-forum.com/t/transforming-nginx-for-windows/236412>\
**Category:** NGINX\
**Created:** [September 1, 2013, 10:59pm UTC](https://www.ruby-forum.com/t/transforming-nginx-for-windows/236412 "2013-09-01T22:59:21Z")\
**Posts on this page:** 12\
**Page:** 2

<div class="post-metadata">

**Author:** ![itpp2012](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/f05b48/32.png) [@itpp2012](https://www.ruby-forum.com/u/itpp2012)\
**Post date:** [March 28, 2014, 11:03pm UTC](https://www.ruby-forum.com/t/transforming-nginx-for-windows/236412/21 "2014-03-28T23:03:30Z")

</div>

## tonyschwartz Wrote:

> Has anyone else experienced nginx.exe 1.5.9.1. Cheshire crashing on  
> Windows server 2003? Intermittently, it is crashing on me with this  
> message in the NT event logs:

> 0.0.0.0, faulting module nginx.exe, version 0.0.0.0, fault address  
> 0x001a54ff.

Have you tried 1.5.12.2 ? contents nginx.conf ?

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,242426,248835#msg-248835](http://forum.nginx.org/read.php?2,242426,248835#msg-248835)

---

<div class="post-metadata">

**Author:** ![itpp2012](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/f05b48/32.png) [@itpp2012](https://www.ruby-forum.com/u/itpp2012)\
**Post date:** [March 28, 2014, 9:49pm UTC](https://www.ruby-forum.com/t/transforming-nginx-for-windows/236412/22 "2014-03-28T21:49:47Z")

</div>

Has anyone else experienced nginx.exe 1.5.9.1. Cheshire crashing on  
Windows  
server 2003? Intermittently, it is crashing on me with this message in  
the  
NT event logs:

Event Type: Information  
Event Source: Application Error  
Event Category: (100)  
Event ID: 1004  
Date: 3/28/2014  
Time: 4:06:50 PM  
User: N/A  
Computer: qwerty101  
Description:  
Reporting queued error: faulting application nginx.exe, version 0.0.0.0,  
faulting module nginx.exe, version 0.0.0.0, fault address 0x001a54ff.

For more information, see Help and Support Center at  
[Microsoft Support](http://go.microsoft.com/fwlink/events.asp).  
Data:  
0000: 41 70 70 6c 69 63 61 74 Applicat  
0008: 69 6f 6e 20 46 61 69 6c ion Fail  
0010: 75 72 65 20 20 6e 67 69 ure ngi  
0018: 6e 78 2e 65 78 65 20 30 nx.exe 0  
0020: 2e 30 2e 30 2e 30 20 69 .0.0.0 i  
0028: 6e 20 6e 67 69 6e 78 2e n nginx.  
0030: 65 78 65 20 30 2e 30 2e exe 0.0.  
0038: 30 2e 30 20 61 74 20 6f 0.0 at o  
0040: 66 66 73 65 74 20 30 30 ffset 00  
0048: 31 61 35 34 66 66 1a54ff

Posted at Nginx Forum:

> **[Re: Transforming nginx for Windows](https://forum.nginx.org/read.php?2,242426,248833#msg-248833)**
>
> Working on getting real high performance with nginx under windows I am rewriting code and already got around the fd\_setsize issue following http://stackoverflow.com/questions/7976388/increasing-limit-of-fd-setsize-and-select/18530636 which is...

---

<div class="post-metadata">

**Author:** ![itpp2012](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/f05b48/32.png) [@itpp2012](https://www.ruby-forum.com/u/itpp2012)\
**Post date:** [April 2, 2014, 7:22pm UTC](https://www.ruby-forum.com/t/transforming-nginx-for-windows/236412/23 "2014-04-02T19:22:40Z")

</div>

This is definitely working better now. Thanks for letting me know about  
the  
newer version. I didn’t notice the newer version because the order the  
versions were appearing was backwards, but that appear to be corrected  
now.

Anyway, now that I’ve upgraded, I am running into a different issue. I  
was  
hoping you all could tell me if I’m missing something basic…

I am trying to run 2 instances of nginx on the same server. They listen  
on  
different ips, and I’ve verified the configs look perfect. I can see  
the  
process is only binding to tcp 80 and 443 on the one ip. Then, when I  
go to  
start the second nginx server, it fails with this:

Assertion failed: ngx\_shared\_sockets-\>pid==pid, file src/core/nginx.c,  
line  
376

If I stop nginx instance 1 and start instance2, it starts fine, but when  
i  
go and try to start instance 1 now, it then fails with the same error  
message. Is there something I’m missing here or is there perhaps an  
issue?

These are being run from completely different directories and I can see  
they  
are using the pid file in their corresponding directories so I don’t  
expect  
t’s an issue like that.

Thanks for your help,

Tony

Posted at Nginx Forum:

> **[Re: Transforming nginx for Windows](https://forum.nginx.org/read.php?2,242426,248934#msg-248934)**
>
> Working on getting real high performance with nginx under windows I am rewriting code and already got around the fd\_setsize issue following http://stackoverflow.com/questions/7976388/increasing-limit-of-fd-setsize-and-select/18530636 which is...

---

<div class="post-metadata">

**Author:** ![itpp2012](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/f05b48/32.png) [@itpp2012](https://www.ruby-forum.com/u/itpp2012)\
**Post date:** [April 2, 2014, 7:47pm UTC](https://www.ruby-forum.com/t/transforming-nginx-for-windows/236412/24 "2014-04-02T19:47:46Z")

</div>

## tonyschwartz Wrote:

> This is definitely working better now. Thanks for letting me know  
> about the newer version. I didn’t notice the newer version because  
> the order the versions were appearing was backwards, but that appear  
> to be corrected now.

Good 🙂 yep I’ve managed to get a proper listing like explorer does.

> Assertion failed: ngx\_shared\_sockets

Any pool (shared memory and others) are named, with 2 instances you get  
2  
pools with the same name which is not allowed, you could hack the name  
in  
the .exe for the second instance, but why run 2 instances ? just merge  
the  
configs and if needed run more workers, up to 64 workers on 32 cores has  
been tested.

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,242426,248935#msg-248935](http://forum.nginx.org/read.php?2,242426,248935#msg-248935)

---

<div class="post-metadata">

**Author:** ![itpp2012](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/f05b48/32.png) [@itpp2012](https://www.ruby-forum.com/u/itpp2012)\
**Post date:** [March 31, 2014, 4:31pm UTC](https://www.ruby-forum.com/t/transforming-nginx-for-windows/236412/25 "2014-03-31T16:31:33Z")

</div>

Trying now, will let you know how it goes. Thanks!

Posted at Nginx Forum:

> **[Re: Transforming nginx for Windows](https://forum.nginx.org/read.php?2,242426,248876#msg-248876)**
>
> Working on getting real high performance with nginx under windows I am rewriting code and already got around the fd\_setsize issue following http://stackoverflow.com/questions/7976388/increasing-limit-of-fd-setsize-and-select/18530636 which is...

---

<div class="post-metadata">

**Author:** ![itpp2012](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/f05b48/32.png) [@itpp2012](https://www.ruby-forum.com/u/itpp2012)\
**Post date:** [April 2, 2014, 8:06pm UTC](https://www.ruby-forum.com/t/transforming-nginx-for-windows/236412/26 "2014-04-02T20:06:28Z")

</div>

I have money for one powerful test server. I run two instances for  
availability reasons.

For example, let’s say I have an integration test environment and an  
acceptance test environment…

On the integration test environment, I want to be able to tinker with  
the  
configs and bring the app up and down much more frequently.

On the acceptance test environment, testers are hammering this, so I  
don’t  
want this to come down as I’m testing the integration environment.

Why not buy two servers you might ask? Well, $$. This is a smaller  
outfit  
and this saves us lots of money. This is just one simple example of how  
I  
use the same server for multiple things. There are plenty of others,  
but  
this is my standard practice when I don’t have lots of resources for  
servers.

Thanks,

Tony

Posted at Nginx Forum:

> **[Re: Transforming nginx for Windows](https://forum.nginx.org/read.php?2,242426,248937#msg-248937)**
>
> Working on getting real high performance with nginx under windows I am rewriting code and already got around the fd\_setsize issue following http://stackoverflow.com/questions/7976388/increasing-limit-of-fd-setsize-and-select/18530636 which is...

---

<div class="post-metadata">

**Author:** ![itpp2012](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/f05b48/32.png) [@itpp2012](https://www.ruby-forum.com/u/itpp2012)\
**Post date:** [April 2, 2014, 8:13pm UTC](https://www.ruby-forum.com/t/transforming-nginx-for-windows/236412/27 "2014-04-02T20:13:29Z")

</div>

Wouldn’t you want to use VMs for that?

On Apr 2, 2014, at 12:05 PM, tonyschwartz [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> want this to come down as I’m testing the integration environment.
> 
> Posted at Nginx Forum:  
> [http://forum.nginx.org/read.php?2,242426,248937#msg-248937](http://forum.nginx.org/read.php?2,242426,248937#msg-248937)
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

–  
Scott R.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[Elevated Software Development, Inc.](http://www.elevated-dev.com/)**

(303) 722-0567 voice

---

<div class="post-metadata">

**Author:** ![itpp2012](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/f05b48/32.png) [@itpp2012](https://www.ruby-forum.com/u/itpp2012)\
**Post date:** [April 3, 2014, 11:06am UTC](https://www.ruby-forum.com/t/transforming-nginx-for-windows/236412/28 "2014-04-03T11:06:59Z")

</div>

## tonyschwartz Wrote:

> run multiple instances. I would suggest nginx for windows should  
> allow it. Perhaps a config entry for this “shared pool name” property  
> can be added to the configs.

I’ve tried this with the plain basic nginx version 1.5.12 which does not  
support multiple instances either, it used to a long while back in the  
1.2.x  
ranges.

You might be able to run something like xp-mode or one of the other free  
MS  
vm’s which are license free.  
And when you have an unused xp license you can easily use this with  
virtualbox.

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,242426,248951#msg-248951](http://forum.nginx.org/read.php?2,242426,248951#msg-248951)

---

<div class="post-metadata">

**Author:** ![itpp2012](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/f05b48/32.png) [@itpp2012](https://www.ruby-forum.com/u/itpp2012)\
**Post date:** [April 2, 2014, 8:31pm UTC](https://www.ruby-forum.com/t/transforming-nginx-for-windows/236412/29 "2014-04-02T20:31:35Z")

</div>

Not really, you’d need another copy of windows depending on the type of  
vm,  
extra licensing, etc. I have been doing this kind of thing very happily  
for  
many many years. I like doing it this way and have had very good  
experiences doing it. Most any kind of app will happily run multiple  
instances. I would suggest nginx for windows should allow it. Perhaps  
a  
config entry for this “shared pool name” property can be added to the  
configs.

Posted at Nginx Forum:

> **[Re: Transforming nginx for Windows](https://forum.nginx.org/read.php?2,242426,248941#msg-248941)**
>
> Working on getting real high performance with nginx under windows I am rewriting code and already got around the fd\_setsize issue following http://stackoverflow.com/questions/7976388/increasing-limit-of-fd-setsize-and-select/18530636 which is...

---

<div class="post-metadata">

**Author:** ![itpp2012](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/f05b48/32.png) [@itpp2012](https://www.ruby-forum.com/u/itpp2012)\
**Post date:** [April 3, 2014, 4:03pm UTC](https://www.ruby-forum.com/t/transforming-nginx-for-windows/236412/30 "2014-04-03T16:03:43Z")

</div>

I hear what you’re saying and I’m not trying to take away from your  
great  
work on this project. I appreciate it very much. It has proven very  
useful  
to me. But, for the long term, I still strongly believe the application  
should be able to be run multiple times on the same windows server  
instance.

Posted at Nginx Forum:

> **[Re: Transforming nginx for Windows](https://forum.nginx.org/read.php?2,242426,248973#msg-248973)**
>
> Working on getting real high performance with nginx under windows I am rewriting code and already got around the fd\_setsize issue following http://stackoverflow.com/questions/7976388/increasing-limit-of-fd-setsize-and-select/18530636 which is...

---

<div class="post-metadata">

**Author:** ![itpp2012](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/f05b48/32.png) [@itpp2012](https://www.ruby-forum.com/u/itpp2012)\
**Post date:** [April 3, 2014, 7:17pm UTC](https://www.ruby-forum.com/t/transforming-nginx-for-windows/236412/31 "2014-04-03T19:17:39Z")

</div>

> very useful to me. But, for the long term, I still strongly believe  
> the application should be able to be run multiple times on the same  
> windows server instance.

I agree with you but its not strait forward to get this to work that  
way,  
I’ll put it on the todo list.

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,242426,248979#msg-248979](http://forum.nginx.org/read.php?2,242426,248979#msg-248979)

---

<div class="post-metadata">

**Author:** ![itpp2012](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/f05b48/32.png) [@itpp2012](https://www.ruby-forum.com/u/itpp2012)\
**Post date:** [September 3, 2014, 12:48am UTC](https://www.ruby-forum.com/t/transforming-nginx-for-windows/236412/32 "2014-09-03T00:48:27Z")

</div>

nginx for Windows, one year on…

Time flies when you’re having fun 🙂 one year down the road transforming  
nginx, rewriting, re-developing, crashing, heavy battles with compilers,  
add-on’s, c++ restrictions, ngxLuaDB powered by nginx for Windows, cross  
compiler, multi node imports… and yet here we are today September 2,  
2014 !

A huge thanks to our team for their relentlessness in getting problems  
solved, to agentzh for fixing VC issues, to nginx.inc developers for  
their  
fast fixes in the base version, to the beta testers for being daring 🙂  
and  
everyone else for your support.

Which mayor items are next?

- More non-blocking Lua, event based DLL add-on’s like pagespeed,  
SharePoint, asp/dotnet.
- Tcp proxy support.
- Full 64 bit builds.
- IO event and thread separation.
- Distributed IO and CPU event processing.

To date 18k+ independent downloads.  
1200+ running in production.

We ain’t done yet, we’re here to stay.

Builds can be found here:  
[http://nginx-win.ecsds.eu/](http://nginx-win.ecsds.eu/)  
Follow releases [https://twitter.com/nginx4Windows](https://twitter.com/nginx4Windows)

Posted at Nginx Forum:

> **[Re: Transforming nginx for Windows](https://forum.nginx.org/read.php?2,242426,253034#msg-253034)**
>
> Working on getting real high performance with nginx under windows I am rewriting code and already got around the fd\_setsize issue following http://stackoverflow.com/questions/7976388/increasing-limit-of-fd-setsize-and-select/18530636 which is...

[Previous page](https://www.ruby-forum.com/t/transforming-nginx-for-windows/236412.md?page=1)
