Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've an issue with using nginx with fastcgi. It just runs for few requests and then it hangs/dies or whatever. Nginx then just returns bad gateway (502).

This is the code I used to spawn fastcgi:

FASTCGI_USER=www-data
FASTCGI_GROUP=www-data
ADDRESS=127.0.0.1
PORT=8080
PIDFILE=/var/run/php-fastcgi/php-fastcgi.pid
CHILDREN=4
PHP5=/usr/bin/php5-cgi

/usr/bin/spawn-fcgi -a $ADDRESS -p $PORT -P $PIDFILE -C $CHILDREN -u $FASTCGI_USER -g $FASTCGI_GROUP -f $PHP5

I'm on Debian Squeeze. Any idea what could be wrong why it happens like this? When I kill all the fastcgi processes and run this script again, everything works for few requests and hangs again..

share|improve this question

1 Answer 1

Figured out that by installing php-fpm (which is amazing) the issue was solved. Installed by following this guide.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.