PHP-FPM pm.start_servers Explained: Configuration, Worker Management, and Best Practices
Introduction
The pm.start_servers directive determines how many worker processes PHP-FPM creates immediately when a process pool starts. It is used only when the process manager is configured in dynamic mode.
Creating a suitable number of workers during startup helps PHP-FPM respond to incoming requests without delay while avoiding unnecessary memory consumption. Choosing an appropriate value depends on expected traffic, available system resources, and the other process manager settings.
This guide explains how pm.start_servers works, how it interacts with related directives, recommended values, and common configuration mistakes.
Test Environment
What Is pm.start_servers?
When PHP-FPM starts, it creates a number of worker processes before receiving any client requests.
The pm.start_servers directive specifies how many workers are created immediately.
Example:
pm = dynamic
pm.start_servers = 5
With this configuration, PHP-FPM launches five worker processes during startup.
These workers are immediately available to handle incoming requests.
How It Works
When PHP-FPM starts:
As traffic increases:
PHP-FPM automatically creates additional workers when demand increases, up to the configured pm.max_children limit.
Check the Current Value
The setting is stored in the PHP-FPM pool configuration.
Typical location:
/etc/php-fpm.d/www.conf
Run:
Example:
pm.start_servers = 5
Change pm.start_servers
Open the pool configuration.
sudo nano /etc/php-fpm.d/www.conf
Locate:
pm.start_servers = 5
Example:
pm.start_servers = 10
Save the file.
Restart PHP-FPM
Apply the changes.
sudo systemctl restart php-fpm
Verify:
sudo systemctl status php-fpm
Expected output:
Active: active (running)
When Is pm.start_servers Used?
The directive only applies when:
pm = dynamic
It is ignored when using:
pm = static
or
pm = ondemand
This is because those process managers create workers differently.
Relationship with Other Process Manager Settings
pm.start_servers works together with the other dynamic process manager directives.
Each directive has a different responsibility.
Example Configuration
pm = dynamic
pm.start_servers = 8
pm.min_spare_servers = 4
pm.max_spare_servers = 12
pm.max_children = 40
Startup sequence:
Choosing the Right Value
The ideal value depends on expected traffic.
A larger value allows more requests to be served immediately after PHP-FPM starts, but it also consumes more memory because each worker occupies RAM even when idle.
Common Issues
Slow Response After Restart
If:
pm.start_servers = 1
the server initially has only one worker available.
Under sudden traffic, PHP-FPM must create additional workers before handling all requests, which can slightly increase response times immediately after startup.
Excessive Memory Usage
If:
pm.start_servers = 50
all fifty workers are created immediately.
On a small server, many of those workers may remain idle while still consuming memory.
Setting Has No Effect
If your configuration uses:
pm = static
or:
pm = ondemand
then pm.start_servers is ignored.
Always verify the value of the pm directive before changing startup worker settings.
Best Practices
Use pm.start_servers only with the dynamic process manager.
Configure a value appropriate for your normal traffic level.
Keep the value consistent with pm.min_spare_servers and pm.max_spare_servers.
Avoid creating excessive idle workers on low-memory systems.
Monitor PHP-FPM performance after configuration changes.
Conclusion
The pm.start_servers directive determines how many PHP-FPM worker processes are created when a process pool starts in dynamic mode. A well-chosen value helps PHP-FPM respond quickly to incoming traffic while avoiding unnecessary memory usage.
Rather than configuring this directive in isolation, it should be tuned together with pm.min_spare_servers, pm.max_spare_servers, and pm.max_children to create a balanced and efficient worker management strategy for your application.
Explore More
› PHP-FPM pm.max_requests Explained: Configuration, Memory Management, and Best Practices
› PHP-FPM pm.max_spare_servers Explained: Configuration, Idle Worker Limits, and Best Practices
› PHP-FPM pm.max_children Explained: Configuration, Performance, and Best Practices
› PHP-FPM pm.min_spare_servers Explained: Configuration, Idle Workers, and Best Practices
› Best Areas to Live in Bangkok in 2026: A Complete Guide for Expats and Digital Nomads
› Best Coworking Spaces in Bangkok 2026: A Guide for Digital Nomads and Remote Workers
› Why Do People in Southeast Asia Love Iced Drinks? The Climate, Culture, and Science Explained
› Best eSIM for Southeast Asia in 2026: Compare the Top Travel eSIMs