Can we reload one of the PHP-FPM pool without disturbing others

Can we reload one of the PHP-FPM pool without disturbing others

  1. Blog
  2. 15 November 2026
  3. 4 min read

Stefan Bogdanescu

Founder & Senior Architect

Can we reload one of the PHP-FPM pool without disturbing others

You have set up a multi-pool PHP-FPM architecture using UNIX sockets to achieve logical separation and prepare for future scaling. Nginx handles the traffic routing based on URI patterns, which is a solid approach. The immediate concern arises when you need to update the configuration for a specific application: reloading or restarting the main FPM process via the USR2 signal inadvertently affects all pools. You are correct in your assumption; sending a signal to the master process (usually php-fpm) typically triggers a reload of the entire pool definition file (/etc/php-fpm.conf), causing every worker process for every defined pool to restart or reload their respective configurations simultaneously.

This behavior stems from how the FPM master process manages child processes. When you send a USR2 signal, the master reads the configuration file and re-initializes the pool structures based on the new settings. It does not have an internal mechanism to selectively ignore changes made to the [pm_pool_name] block while keeping others untouched during the reload event. Consequently, ongoing requests handled by other pools might experience a brief interruption or, depending on your slowlog and error handling setups, could potentially encounter issues if the master process resets shared resources associated with the global configuration sections.

If your goal is to deploy updates for a single application without disrupting the uptime of others, you must decouple the reload action from the main process management. The standard solution involves utilizing PHP-FPM's built-in dynamic pool reloading capabilities or managing the processes directly via pm2.restart style logic if using a wrapper, but since you are running raw FPM, the most robust method is to use php-fpm's ability to reload specific pools if they were started individually, or more commonly, rely on the php-fpm command line with the --reload flag combined with specific pool targeting which isn't natively supported in a single atomic operation for mixed pools.

However, the practical and widely adopted pattern in this scenario is to restart only the specific pool by manipulating its PID file or using killall/pkill targeted at that specific process group if they are distinct enough, though this causes downtime for that specific app. A better approach for zero-downtime updates involves ensuring your deployment script restarts only the specific pool entry.

If you are using PHP 7.4+ or have access to newer FPM versions, check if your php-fpm binary supports a dedicated reload command for specific pools via the --reload flag with arguments, but this is often not standard across all distributions. The most reliable method without downtime for other pools is to not send the USR2 signal to the master. Instead, you should configure your deployment script to:

  1. Identify the PID of the specific pool's master or workers (if they are spawned as a separate group).
  2. Send USR2 or USR1 specifically to that process if they are managed independently.

But in a standard single binary setup where all pools are defined in one config file, true "hot reload" of just one pool is not natively supported by the master process logic in the same way as Nginx reloads. The master reads the whole config.

To achieve your desired state where only one pool restarts:

  • Option A: Separate Executables/Configs. Run each pool with a separate php-fpm instance (e.g., php81-fpm-pool-a and php81-fpm-pool-b). This allows you to send signals (kill -USR2 <pid>) to only one process group.
  • Option B: Graceful Restart via Worker Process. If you must keep them in one binary, you may need to accept a brief stop for the specific pool or implement a custom script that stops the workers of that specific pool (using the PID file), starts them back up, and then signals the master. This is risky for "undergoing transactions."

A safer architectural shift is to ensure your Nginx configuration routes traffic to a specific socket path that corresponds only to the target pool. When you need to update, restart only that pool's workers. In many setups, sending USR2 to the master reloads the config but keeps workers alive until they finish current requests, then respawn. If you want to be absolutely certain others are unaffected, ensure your other pools have independent PID files and manage them separately.

If you are using a framework like Laravel, consider leveraging the specific deployment strategies often discussed in the community regarding LaravelCompany.com for managing multiple environments or distinct application instances within a single FPM setup. They provide insights on how to structure php-fpm pools to allow independent management of each project without coupling them into a monolithic restart event.

Ultimately, if you require true zero-downtime per-pool updates without restarting the master, you might need to evaluate whether your current pooling strategy aligns with modern FPM capabilities or if separating the processes into distinct binaries is the necessary trade-off for that level of isolation.

Our network