Wednesday, 15 September 2010

php - spawn-fcgi dying after a number of connections -


I recently set up a new Ubuntu machine with WordPress, Spawn-FCG and NGNA.

Every morning, I will try to see my blog and I got a 50 gate gateway error.

I tried to find some sort of thing, why php-cgi died, but nothing was found.

I run spawn-fcgi like this:

  sudo / usr / bin / spawn-fcgi -a 127.0.0.1 -p 9000 -U www-data - G www-data -f / usr / bin / php5-cgi -p /var/run/fastcgi-php.pid  

I just tested the following:

Ran spawn-fcgi

After about 480 connections, the egg-FCG died and I started receiving 502 errors.

With no idea why would I have any kind of logs?

This can not be a real improvement, but setting

  PHP_FCGI_MAX_REQUESTS = 400  

Environmental variables will force PHP to kill and re-execute after 400 requests, so the problem will not appear.


No comments:

Post a Comment