Nginx error

Hello,

My nginx server always redirect all traffic to 50x page from time to
time. I
can’t even restart it. I need to reboot.

The worker_processes 5 and worker_connections is 4096, is it too many?

How can I check what is the case of the problem? Thanks.

Max

On Sun, 2009-03-08 at 21:29 +0800, Max wrote:

Hello,

My nginx server always redirect all traffic to 50x page from time to
time. I can’t even restart it. I need to reboot.

You can’t restart Nginx, or restarting it doesn’t help?

The worker_processes 5 and worker_connections is 4096, is it too
many?

Unless you have 5 or more cores, then that’s almost certainly too many.
Try one worker process per core (maybe even just one, unless you are
serving tons of static files) and 1024 worker_connections.

I have no idea if this is related to the 50x errors you get.

How can I check what is the case of the problem? Thanks.

I’d start with the error log and some details about your setup (starting
with your OS, Nginx version, and maybe what you are serving).

Regards,
Cliff

Thanks.

I just changed worker processes to 2 and worker connections to 1024.

But there problem is still there. It redirects me to 50x page from time
to
time.

The only way to make it work again is, kill all nginx process, restart
it,
and then I must type:

/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u nginx -g nginx -f
/usr/bin/php-cgi -P /var/run/fastcgi-php.pid

in order to make it works again. It seems the problem is related to
fastcgi.

I am using 0.6.33-1.el5(nginx) and 1.4.18-1.el5.rf(lighttpd). Anyone got
any
idea what this happen?

Max

Not to bring up yesterday’s discussion, but you might try using php-fpm
and letting us know.

Sent from my Verizon Wireless BlackBerry

On Tue, 2009-03-10 at 22:18 +0800, Max wrote:

Thanks.

I just changed worker processes to 2 and worker connections to 1024.

But there problem is still there. It redirects me to 50x page from
time to time.

Which particular 50x code? The code can often help you figure out the
problem.

The only way to make it work again is, kill all nginx process, restart
it, and then I must type:

/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u nginx -g nginx
-f /usr/bin/php-cgi -P /var/run/fastcgi-php.pid

in order to make it works again. It seems the problem is related to
fastcgi.

Quite likely. There’s a few settings you can adjust for dealing with
FCGI apps. Is the PHP app a well-known one?

Cliff

I might find out the problem.

I got some idn doamins. They are running wordpress with wp super cache,
when
I request the inner page (the url path is not English, so is the cache
file). Nginx seems can’t get the inner page(no problem for front page).
Then
nginx become really slow and then stop working. After I deactive the wp
super cache for the idn domains, then no more problem so far.

I think the problem is related to wp super cache or their rewrite rule.
It
seems nginx can’t find the url and continous request or looking for the
idn
cache file, so make the server really slow. I can’t remember which 50x
page,
since I can’t reproduce the problem now.

Thanks for all input, anyway.

Max