20 messages in ru.sysoev.nginxRe: (fast)cgi and nginx - there has t...
FromSent OnAttachments
Jonathan VanascoSep 23, 2008 3:33 pm 
mikeSep 23, 2008 3:38 pm 
Rob SchultzSep 23, 2008 4:10 pm 
Roger HooverSep 23, 2008 4:13 pm 
mikeSep 23, 2008 4:48 pm 
Jim OhlsteinSep 23, 2008 4:57 pm 
Aleksandar LazicSep 23, 2008 11:54 pm 
Jonathan VanascoSep 25, 2008 7:07 am 
Reinis RozitisSep 25, 2008 8:13 am 
Almir KaricSep 25, 2008 9:35 am 
mikeSep 25, 2008 11:08 am 
Reinis RozitisSep 25, 2008 11:40 am 
mikeSep 25, 2008 11:49 am 
Aleksandar LazicSep 25, 2008 11:24 pm 
Reinis RozitisSep 26, 2008 2:57 am 
Igor SysoevSep 26, 2008 3:02 am 
Reinis RozitisSep 26, 2008 3:29 am 
Almir KaricSep 26, 2008 7:11 am 
Tit PetricSep 27, 2008 1:04 am 
Phillip B OldhamSep 29, 2008 5:15 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: (fast)cgi and nginx - there has to be a better wayActions...
From:mike (mike@gmail.com)
Date:Sep 25, 2008 11:08:06 am
List:ru.sysoev.nginx

On Thu, Sep 25, 2008 at 8:14 AM, Reinis Rozitis <r@roze.lv> wrote:

Basically you dont need 'spawn-fcgi' from lighty to run php (for example). Because php by default has the ability to spawn and control the childs on its own..

exactly! this is all it does...

set env PHP_FCGI_MAX_REQUESTS set env PHP_FCGI_CHILDREN php -b $port!

php-fpm is much better, it allows for a nice config, easily set uid/gid for each group, proper max requests / children - spawn-fcgi for me did not seem to honor the max requests so my php engines never restarted... kind of a big feature to be missing.

before php-fpm i just made my own upstart (on ubuntu) script which basically did this

env PHP_FCGI_MAX_REQUESTS=500 env PHP_FCGI_CHILDREN=10 su -u $user /usr/local/bin/php -b $port

and it recycled the engines properly etc. but it wasn't as simple as php-fpm.