(fast)cgi and nginx - there has to be a better way
mike503 at gmail.com
Thu Sep 25 22:08:29 MSD 2008
On Thu, Sep 25, 2008 at 8:14 AM, Reinis Rozitis <r at 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
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.
More information about the nginx