Do you still use spawn-fcgi with Nginx? It’s time to consider PHP-FPM.

PHP in the form in which it is available from php.net has a number of well-known issues associated with the use of the FastCGI SAPI in production. See this comparison chart of problems and how php-fpm handles them, when enabled with the FastCGI SAPI.

Features available only in PHP-FPM:

  • Process Management. Ability to “graceful” stop and start php workers without losing any queries. The possibility of gradually update the configuration and binary without losing any queries.
  • Emergency restart all the processes in the event of accidental destruction of shared memory opcode cache, if used accelerator.
  • Starting the workers with different uid/gid/chroot/environment and different php.ini option. You do not need a safe mode!
  • Forcing the completion of process if set_time_limit() fails
  • Logging stdout & stderr business processes.

How to install PHP-FPM.

How to configure PHP-FPM.

PHP-FPM start/stop example

Questions? Problems? Comments?

Let me know!


Trademarks and Technology