Forum: NGINX Transforming nginx for Windows

2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2013-09-01 22:59
(Received via mailing list)
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/increas...
which is documented as http://support.microsoft.com/kb/111855

I came across an interesting issue (FD_SETSIZE compiled for 8196), when
worker_connections is set to 1024 I can get a max of 4500 true
concurrent
connections working, when worker_connections is set to 2048 I can get a
max
of 9000 true concurrent connections working, is there some kind of
recycling
of FD going on inside nginx ? if not I need to look somewhere else.
I intend to also solve the worker_processes issue but I first want to
find
out who is recycling the FD's.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242426,242426#msg-242426
40b4c848b8fcd63b0cb60b9d170c3a77?d=identicon&s=25 Valentin V. Bartenev (Guest)
on 2013-09-02 01:15
(Received via mailing list)
On Monday 02 September 2013 00:58:42 itpp2012 wrote:
> recycling of FD going on inside nginx ? if not I need to look somewhere
> else. I intend to also solve the worker_processes issue but I first want
> to find out who is recycling the FD's.
>

Yes, there is one.  See the ngx_drain_connections() function with
the accompanying ngx_reusable_connection().

  wbr, Valentin V. Bartenev
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2013-09-02 19:27
(Received via mailing list)
Found them, tnx, no adjustment needed here, it's dealing with the much
larger FD table without problems. Got up to 12k concurrent connections
today
one worker one cpu at around 40% utilization, can't get beyond that yet
due
to the test tool not being able to go beyond 12k :)

If anyone wants to test as well let me know, I can place the binary
(based
on 1.4.2) somewhere.

Valentin, can you explain what the problem is with multiple workers and
which source files are involved?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242426,242468#msg-242468
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2013-09-04 21:31
(Received via mailing list)
If you want to test along pushing the max concurrent limit here's my
experimental version:
nginx 1.4.2 experimental b01.zip
http://www.sendspace.com/file/zc4ak8
MD5:   812ea5e77b39a11468291d9cb9b87503
SHA1:   a2fb9e89fb272a3b3ee6162667f88e662c591ba6

Got to 20k concurrent connections today, anyone know of a test tool that
can
go beyond 20k concurrent?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242426,242545#msg-242545
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2013-09-10 21:26
(Received via mailing list)
10:27 10-9-2013: B02 build

Based on nginx 1.4.2 with;
  pcre-8.32
  zlib-1.2.8
  openssl-1.0.1e
+ Compiled with: FD_SETSIZE = 16384 (original Windows source files
modified)
+ Now capable to handle C250K ! (with optimization registry file)
+ Added Windows optimization registry file, check your current values
BEFORE
setting the new ones
+ Added debug symbols file (let us know where it went wrong when you
have a
crash)
+ Added adjusted nginx(-win).conf for Windows
+ Added SPDY
* Runs on Windows XP SP3 or higher, both 32 and 64 bit
* Set priority to High for both nginx.exe processes
* When nginx is running as a service: My computer -> Properties ->
Advanced
-> Performance ->
  Advanced -> Processor scheduling, Adjust for best performance set to
background services
* Website created for easy download: http://nginx-win.ecsds.eu/

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242426,242735#msg-242735
01d109477433f1725357f49c29267615?d=identicon&s=25 Andrew Alexeev (Guest)
on 2013-09-11 15:43
(Received via mailing list)
On Sep 10, 2013, at 11:25 PM, itpp2012 <nginx-forum@nginx.us> wrote:

> setting the new ones
> * Website created for easy download: http://nginx-win.ecsds.eu/
Just checking if you have any patches against nginx-1.4 or nginx-1.5 to
share?

Thanks!
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2013-09-11 19:23
(Received via mailing list)
nginxorg Wrote:
-------------------------------------------------------
> Just checking if you have any patches against nginx-1.4 or nginx-1.5
> to share?
>
> Thanks!

When the outstanding issues have been resolved all code will flow back
into
the community, my target is a Windows nginx version that can compile,
perform and scale the same as the linux version. I've just setup a
budget
for some quality c++ programmers since my c++ knowledge is not enough to
tackle everything. As asked before I would appreciate a technical
explanation why windows issues are what they are as this would speed up
working out a solution.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242426,242761#msg-242761
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2013-09-23 19:43
(Received via mailing list)
Lua compiled in!

Transforming nginx for Windows:
  http://forum.nginx.org/read.php?2,242426
  https://groups.google.com/forum/#!forum/openresty-en (Lua nginx
compiled
for nginx windows)
Builds can be found here:
  http://nginx-win.ecsds.eu/

10:37 23-9-2013: nginx 1.5.6.1 Alice

Based on nginx 1.5.6 (22-9-2013) with;
+ Streaming with nginx-rtmp-module, v1.0.4
(http://nginx-rtmp.blogspot.nl/)
+ lua-nginx-module v0.8.9 (tnx to agentzh about precompiled headers!)
+ LuaJIT-2.0.2 => (lua51.dll include / lua51.lib build)
+ Added lua51.dll (is required)
+ ngx_devel_kit v0.2.15
* Additional specifications are like 10:27 10-9-2013: B02 build

Todo:
- Still working on the multiple worker issue.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242426,243071#msg-243071
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2013-09-25 19:44
(Received via mailing list)
13:46 25-9-2013: nginx 1.5.6.3 Alice

Based on nginx 1.5.6 (25-9-2013) with;
+ Bug fixes in lua-nginx-module(master 25-9-2013) and
ngx_devel_kit(master
25-9-2013) by agentzh
+ Both debug and non-debug versions, the non-debug version is production
use
ready !
* vcredist_x86 is required, get it here
(http://www.microsoft.com/en-us/download/details.aspx?id=5555)
* Additional specifications are like 10:37 23-9-2013: nginx 1.5.6.1
Alice
* 1.5.6.2 was skipped for public release

Builds can be found here:
  http://nginx-win.ecsds.eu/

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242426,243143#msg-243143
37f3ea777f96500b332a1a89d6027897?d=identicon&s=25 Yichun Zhang (agentzh) (Guest)
on 2013-09-25 21:48
(Received via mailing list)
Hello!

On Wed, Sep 25, 2013 at 10:43 AM, itpp2012 wrote:
> Based on nginx 1.5.6 (25-9-2013) with;
> + Bug fixes in lua-nginx-module(master 25-9-2013) and ngx_devel_kit(master
> 25-9-2013) by agentzh

First of all, thank you for the work on Windows! :)

It'll be great if you can try running ngx_lua (and other nginx
modules') test suite against your Windows build on Windows. The test
scaffold is written in Perl which *may* run on Windows out of the box
:)

Thanks!
-agentzh
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2013-09-25 23:02
(Received via mailing list)
> First of all, thank you for the work on Windows! :)

We're getting there slowly! :) I've got 2 workers working, just need to
figure out why :)

> It'll be great if you can try running ngx_lua (and other nginx
> modules') test suite against your Windows build on Windows. The test
> scaffold is written in Perl which *may* run on Windows out of the box

Url of this scaffold? I can get anything running so this is going to be
an
interesting test.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242426,243149#msg-243149
37f3ea777f96500b332a1a89d6027897?d=identicon&s=25 Yichun Zhang (agentzh) (Guest)
on 2013-09-25 23:57
(Received via mailing list)
Hello!

On Wed, Sep 25, 2013 at 2:02 PM, itpp2012 wrote:
>
> Url of this scaffold? I can get anything running so this is going to be an
> interesting test.
>

See the official documentation for the ngx_lua test suite:

    http://wiki.nginx.org/HttpLuaModule#Test_Suite

Good luck!
-agentzh
2974d09ac2541e892966b762aad84943?d=identicon&s=25 tonyschwartz (Guest)
on 2014-02-07 19:06
(Received via mailing list)
This is very nice.  Thanks.  I noticed the
encrypted-session-nginx-module is
missing from this build.  Is there some reason you omitted it?  Have you
published any docs on how to build this ourselves in windows using your
source code?  Or is that obvious and I should RTM?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242426,247287#msg-247287
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2014-02-07 19:35
(Received via mailing list)
tonyschwartz Wrote:
-------------------------------------------------------
> This is very nice.  Thanks.  I noticed the
> encrypted-session-nginx-module is missing from this build.  Is there

No reason to omit it other then no one has requested it :) I'll have a
look
and add it if there are no cross source/module conflicts for the next
release, at the moment we're busy with integrating a select-boost api in
the
core.

> some reason you omitted it?  Have you published any docs on how to
> build this ourselves in windows using your source code?  Or is that
> obvious and I should RTM?

A Rtfm is always recommended ;)

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242426,247288#msg-247288
2974d09ac2541e892966b762aad84943?d=identicon&s=25 tonyschwartz (Guest)
on 2014-03-06 17:55
(Received via mailing list)
How ready is this for production?  I seem to be getting a lot of
intermittent timeouts/dropped connections to the backend or something
doing
upstream proxying.  Just wondering before I go digging into this any
more.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242426,248190#msg-248190
2974d09ac2541e892966b762aad84943?d=identicon&s=25 tonyschwartz (Guest)
on 2014-03-06 18:10
(Received via mailing list)
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2014-03-06 19:29
(Received via mailing list)
tonyschwartz Wrote:
-------------------------------------------------------
> How ready is this for production?  I seem to be getting a lot of
> intermittent timeouts/dropped connections to the backend or something
> doing upstream proxying.  Just wondering before I go digging into this
> any more.

It is ready for production use and it used in production servers, just
keep
an eye out for Beta's which offer solutions to many other problems as we
go
along redeveloping. Problems with backends are common and mostly not
related
to nginx as nginx just passes to a backend, anything can go wrong while
talking to a backend.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242426,248199#msg-248199
2974d09ac2541e892966b762aad84943?d=identicon&s=25 tonyschwartz (Guest)
on 2014-03-07 00:05
(Received via mailing list)
There is definitely some issue doing proxying.  At some point, the
connection to the back end appears to go bad.  The request from the
browser
to nginx just spins and spins.  This occurs against (ahem...) IIS6 and
also
against the Cassini local visual studio development environment exhibits
this behavior.  I will try this from a linux host to see if I can
reproduce
the issue there.  The issue I'm experiencing seems to be very much the
same
as in the other topic I referenced above.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242426,248207#msg-248207
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2014-03-07 10:22
(Received via mailing list)
tonyschwartz Wrote:
-------------------------------------------------------
> There is definitely some issue doing proxying.  At some point, the
> connection to the back end appears to go bad.  The request from the
> browser to nginx just spins and spins.  This occurs against (ahem...)
> IIS6 and also against the Cassini local visual studio development

99% sure this is a backend issue, we're using it for proxied IIS5/6/7,
tomcat, java. Fcgi'd php and RoR. The WAF (naxsi) for protecting
internet
facing applications, plenty of Lua code provisioning, Lua scaled backend
load-balancing, authentication, etc...

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242426,248221#msg-248221
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2014-03-07 11:19
(Received via mailing list)
Hello!

On Thu, Mar 06, 2014 at 06:05:03PM -0500, tonyschwartz wrote:

> There is definitely some issue doing proxying.  At some point, the
> connection to the back end appears to go bad.  The request from the browser
> to nginx just spins and spins.  This occurs against (ahem...) IIS6 and also
> against the Cassini local visual studio development environment exhibits
> this behavior.  I will try this from a linux host to see if I can reproduce
> the issue there.  The issue I'm experiencing seems to be very much the same
> as in the other topic I referenced above.

The issue in a topic you've referenced is wrong address used in
proxying.  See http://trac.nginx.org/nginx/ticket/496 for detailed
explanation.

--
Maxim Dounin
http://nginx.org/
2974d09ac2541e892966b762aad84943?d=identicon&s=25 tonyschwartz (Guest)
on 2014-03-28 21:49
(Received via mailing list)
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
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:
http://forum.nginx.org/read.php?2,242426,248833#msg-248833
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2014-03-28 23:03
(Received via mailing list)
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
2974d09ac2541e892966b762aad84943?d=identicon&s=25 tonyschwartz (Guest)
on 2014-03-31 16:31
(Received via mailing list)
Trying now, will let you know how it goes.  Thanks!

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242426,248876#msg-248876
2974d09ac2541e892966b762aad84943?d=identicon&s=25 tonyschwartz (Guest)
on 2014-04-02 19:22
(Received via mailing list)
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:
http://forum.nginx.org/read.php?2,242426,248934#msg-248934
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2014-04-02 19:47
(Received via mailing list)
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
2974d09ac2541e892966b762aad84943?d=identicon&s=25 tonyschwartz (Guest)
on 2014-04-02 20:06
(Received via mailing list)
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:
http://forum.nginx.org/read.php?2,242426,248937#msg-248937
15eb13d662803f57bc4aea59704988b4?d=identicon&s=25 Scott Ribe (Guest)
on 2014-04-02 20:13
(Received via mailing list)
Wouldn't you want to use VMs for that?

On Apr 2, 2014, at 12:05 PM, tonyschwartz <nginx-forum@nginx.us> 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
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx


--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice
2974d09ac2541e892966b762aad84943?d=identicon&s=25 tonyschwartz (Guest)
on 2014-04-02 20:31
(Received via mailing list)
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:
http://forum.nginx.org/read.php?2,242426,248941#msg-248941
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2014-04-03 11:06
(Received via mailing list)
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
2974d09ac2541e892966b762aad84943?d=identicon&s=25 tonyschwartz (Guest)
on 2014-04-03 16:03
(Received via mailing list)
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:
http://forum.nginx.org/read.php?2,242426,248973#msg-248973
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2014-04-03 19:17
(Received via mailing list)
> 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
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2014-09-03 00:48
(Received via mailing list)
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/
  Follow releases https://twitter.com/nginx4Windows

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242426,253034#msg-253034
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.