PHP-FPM: A simple and robust FastCGI Process Manager for PHP with configuration

Published on Author admin


PHP-FPM – FastCGI Process Manager for PHP, configuration and installation

PHP-FPM (FastCGI Process Manager) is an alternative simple and robust PHP FastCGI implementation with some additional features useful for sites of any size, especially for high-load sites.

Killing features of PHP-FPM are:

  • Adaptive process spawning
  • Basic statistics (an alternative Apache’s mod_status)
  • Advanced process management with graceful stop/start
  • Simplicity in scaling and HA (you can create as many instances as you wish, balancing with nginx’s upstreams)
  • Ability to start workers with different uid/gid/chroot/environment and different php.ini (replaces safe_mode)
  • Stdout & stderr logging
  • Emergency restart in case of accidental opcode cache destruction
  • Accelerated upload support
  • Support for a “slowlog”
  • Enhancements to FastCGI, such as fastcgi_finish_request() – a special function to finish request & flush all data while
  • continuing to do something time-consuming (video converting, stats processing, etc.)

Installation of PHP-FPM:


You need to check “Build FPM version”


Debian, Ubuntu:

PHP-FPM configuration example:
configuration file is php-fpm.conf

Nginx proxy emaple: