Nginx and VirtualBox, heavy load

I have been using nginx very successfully as a reverse proxy (in front
of a bank of web servers) on Linux. For a special project I’m working
on, we were hoping to use the same setup but running in a Linux virtual
machine under VirtualBox, hosted on a Windows 2003 Server machine
(forced on us by other software considerations!). I’ve been a little
disappointed in my stress testing (with ab and my own Java testing tool)
to find that under heavy load (multiple concurrent users), a lot of
requests are failing, with the error being the ‘connection reset by
peer’. Now, I’m not sure that the requests are even reaching nginx (is
there a way to tell?), but if it is, what might be causing this error?
And if this is in fact OT and it’s a networking problem, can anyone give
me any pointers :)? I should say that this using VirtualBox’s NAT and
in-built port forwarding. nginx is 0.6.35, on Ubuntu.

Incidentally, I should say that the testing I’ve been doing is designed
to be pretty harsh, and for less heavily loaded sites or sites where the
occasional dropped request isn’t critical, the VirtualBox solution is
great and I’m very impressed with how good the performance is. (I use VB
in my daily work life to run an Ubuntu VM on my Windows Vista laptop.
Ugh, I just said the V word, I’m going to have to go and wash my mouth
out).

John M. wrote:

I have been using nginx very successfully as a reverse proxy (in front
of a bank of web servers) on Linux. For a special project I’m working
on, we were hoping to use the same setup but running in a Linux virtual
machine under VirtualBox, hosted on a Windows 2003 Server machine
(forced on us by other software considerations!). I’ve been a little
disappointed in my stress testing (with ab and my own Java testing tool)
to find that under heavy load (multiple concurrent users), a lot of
requests are failing, with the error being the ‘connection reset by
peer’. Now, I’m not sure that the requests are even reaching nginx (is
there a way to tell?), but if it is, what might be causing this error?

http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=1006619
Performance issues with bridged networking and Windows Server 2003 SP2

http://support.microsoft.com/kb/904946
You experience intermittent communication failure
between computers that are running Windows XP or Windows Server 2003

And if this is in fact OT and it’s a networking problem, can anyone give
me any pointers :)? I should say that this using VirtualBox’s NAT and
in-built port forwarding. nginx is 0.6.35, on Ubuntu.

try use free VMware Server 2.0.1 with paravirtualized linux VM drivers,
may be this is VirtualBox issue. not use NAT, use bridged networking.

also try look at error.log of nginx with info loglevel
inside Linux VM inside VirtualBox inside Windows 2003 Server,
may be worker_rlimit_nofile parameter and kernel need to be tuned.
something like this:

cat /etc/sysctl.conf | grep net.core.somaxconn

net.core.somaxconn = 10240

cat /etc/nginx/nginx.conf | grep worker_rlimit_nofile

worker_rlimit_nofile 10240;

Gena,

Thanks very much for the response. In fact, I just managed to get
Bridged Adapter mode working and all performance problems have vanished.
I’m not getting any errors and I’m getting great speed!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs