Configuring Plesk PHP-FPM per Domain: Fine-Tuning Performance

PHP-FPM can be configured per domain in Plesk, but more workers do not automatically mean better performance. First, check the handler being used, the affected pool, and the available resources. A higher worker limit It can help when the pool is heavily loaded and there are sufficient reserves; however, it can exacerbate problems when CPU resources are scarce, RAM is limited, or the database is slow. For Plesk Obsidian on Linux, we'll show you how to document settings, change them carefully, and monitor their effects.

PHP-FPM and the Actual Bottleneck

In Plesk Obsidian on Linux, an FPM handler can forward PHP requests to a pool of worker processes. Each available worker processes a request; having multiple workers thus enables parallel processing. The pool configuration limits the number of processes available for this purpose. These relationships cannot be easily applied to Windows or other PHP handlers.

A queue At first glance, this merely indicates that requests are waiting to be processed. It does not prove that the worker limit alone is too low: even a brief surge in traffic or unusually long-running requests can tie up all available workers. What matters is what happens in the pool and on the rest of the server during that time.

The application runtime affects how quickly a worker becomes available for the next request. For example, if a store is waiting for an external interface or a CMS is performing a resource-intensive task, the process remains occupied for a longer period of time. Having more workers can reduce wait times in the pool, but it does not resolve the slow processing itself.

If the CPU is already heavily loaded, additional workers will compete for processing time. They may even slow down processing instead of quickly completing more requests. Therefore, check the CPU utilization during the relevant load phase and not just the threshold value in the PHP Settings.

RAM and the database also impose limits on parallelism. Additional processes require memory; when memory is scarce, swapping can make the situation worse. A database that is already overloaded can come under even more strain from additional concurrent PHP requests. To make a change to Plesk PHP-FPM So you need an overview of the total load, not just the pool values.

Distinguishing Between Handlers, Web Servers, and Isolation

A setting per domain does not automatically constitute a completely isolated resource budget. Plesk distinguishes the normal FPM handler from the dedicated FPM handlers. With the standard handler, websites running the same PHP version share a common process and cache infrastructure. The dedicated handler provides separate process pools and a separate OPcache.

Separate process pools improve the separation between websites. However, they do not reserve CPU or RAM for a specific website: Other domains and services continue to compete for the shared resources. A shared database also remains a potential bottleneck.

AI-generated illustration of separate process groups on a shared resource area
AI-generated illustration: A dedicated handler delimits process structures but does not reserve shared server resources.

With a dedicated handler, a separate OPcache is added. This can improve cache isolation but increases memory usage. Especially on a server hosting many small websites, you should therefore weigh the additional memory usage against the benefits of isolation, rather than automatically selecting the dedicated handler for every domain.

Not every PHP version and handler is installed on your server or available with your subscription. Check the domain configuration to see which combinations your provider actually offers and which options your permissions allow. If certain options are missing, the server administration team or your hosting provider can assist you.

The choice of PHP handler and the way it is run by the web server should be considered separately: On Linux, FPM can be run via Apache or nginx. If you switch to running it via nginx, be sure to check redirects, access control, and other application rules in particular. nginx evaluates content .htaccess is not sufficient; the necessary rules must be included in a configuration suitable for nginx.

Understanding Process Managers and Worker Limits

The FPM process manager determines how the pool manages its workers. The setting pm distinguishes between the modes static, dynamic and ondemand. Which mode is appropriate depends, among other things, on how frequently requests are received and how much memory should remain available even when the system is idle.

At static the number of workers is fixed: pm.max_children This fixed number determines the behavior here. It makes the number of processes kept on standby highly predictable, while also ensuring that processes are available even when traffic is low. A high value must therefore be consistent with the available capacity, even if the website is currently seeing very little traffic.

At dynamic FPM changes the process count within the configured limits. pm.start_servers sets the number at startup; pm.min_spare_servers and pm.max_spare_servers control the desired range of free workers. These start and spare values are part of the "dynamic" mode, not the "ondemand" control.

At ondemand Starts FPM workers as needed and terminates idle processes after the configured idle time. This can reduce the number of processes kept running for rarely used websites. However, if several long requests arrive at the same time, the pool may still require many workers in this mode and consume a corresponding amount of memory.

In "dynamic" and "ondemand," it is pm.max_children the Upper limit the worker. If a sufficient number of concurrent requests reach the pool, additional requests cannot be processed simultaneously by a single worker. Setting a higher limit only provides useful leeway if the remaining resources and the application can handle this additional concurrency.

Configuring PHP-FPM per Domain

In Plesk, open the relevant domain and navigate to „PHP“ or „PHP Settings.“ The exact menu label may vary depending on the interface. Your account must have permission to change the PHP settings; the available options also depend on your permissions and your hosting provider.

First, check the displayed PHP version and the handler. The FPM parameters apply to an FPM handler; the displayed PHP version alone does not indicate which process is handling the requests. Also, determine which pool is affected by the change. If you lack the necessary information, check with your provider or the server administration team.

Before making any changes, document the Plesk and PHP versions, the handler, and the current values under „PHP-FPM Settings.“ Also note when and why you want to make changes—for example, due to recurring warnings despite available resource reserves. This will allow you to compare the status later and undo a specific change if necessary.

Start by changing only one well-justified parameter and, if possible, implement it first in a suitable test environment. Then test key website functions, such as login and typical dynamic pages. Next, monitor response times, errors, and server load over a comparable period of time; successful storage alone does not necessarily prove any benefit.

If errors or unexpectedly high loads occur, restore the documented default value and test the function again. If a required setting is missing from the interface, do not assume that you have the same permissions on all Plesk systems: Have the provider verify the change and its effects, if necessary.

Comparison of Key FPM Parameters

The parameters do not act independently of one another. In particular, the start and spare values apply to dynamic, while pm.max_children determines the size of the pool in all three modes. The following overview helps you assess the intended effect of a change and its possible side effects.

FPM Parameters by Function and Process Manager Mode
ParametersMode and FunctionBenefits and Risk of Misconfiguration
pmstatic, dynamic, or on-demand; the process manager selects the mode.Determines whether workers are maintained statically, dynamically adjusted, or started as needed; an inappropriate mode may result in unnecessary processes being maintained or require workers to be started under load.
pm.max_childrenstatic: fixed number of workers; dynamic and ondemand: upper limit.Limits parallel processing; if set too low, requests may be delayed; if set too high, resources may be overloaded.
pm.start_serversdynamic: Number of workers at startup.Provides initial capacity; a high value starts a corresponding number of processes initially.
pm.min_spare_serversdynamic: Minimum number of available workers requested.Reserves capacity for new requests; a high value may result in more idle processes.
pm.max_spare_serversdynamic: Maximum number of available workers requested.Limited number of available workers; a very low value may encourage more frequent process starts.
pm.max_requestsAll modes: Number of requests processed before a worker is replaced; 0 means unlimited.Recycling can limit the accumulation of waste; frequent replacement creates additional work.

At dynamic The "Start" and "Spare" values must be considered as part of a single configuration. They do not determine how many visitors a website can serve simultaneously: Among other factors, the decisive factors are how long individual PHP requests occupy a worker and what resources they require during that time.

The Worker Recycling through pm.max_requests This can help if an embedded library is leaking memory across multiple requests. However, it does not fix the leak. A lower value does not automatically mean better performance either: workers are replaced more frequently, while the actual cause still needs to be investigated.

Estimating the Worker Limit with Memory Reserve

A memory estimate can provide a rough order of magnitude, but it cannot prove a definitive threshold. First, you need to determine which pool is affected and how much RAM is actually available for additional workers after accounting for the operating system, database, web server, other applications, and a safety margin. Also factor in peak loads from other domains.

AI-generated stock image of a single RAM module on an antistatic mat
AI-generated stock image: The amount of available RAM limits the number of additional PHP-FPM workers.

Illustrative calculation example; not a measurement. Assuming that, after the aforementioned deductions, 600 MiB are available for additional workers and each additional worker requires, conservatively estimated, 75 MiB, then 600 ÷ 75 yields a maximum of eight additional workers. This number is neither a recommended setting nor a guarantee of stable operation.

In this example, the eight refer to the estimated additional demand, not necessarily the entire pool. Existing workers and their memory usage must be factored into the initial calculation. Before you use this to determine a possible new upper limit, also check whether the CPU and database can handle the additional concurrency.

The actual additional memory requirement is not constant: Queries may require varying amounts of memory, and some processes share memory areas. OPcache and simultaneously active domains also affect the total memory budget. Simply multiplying the number of processes may count shared memory areas multiple times; conversely, complex queries may exceed the original estimate.

The PHP-memory_limit Limits the amount of memory a script is allowed to use. It is not equal to the total operating system memory of an FPM worker and therefore cannot be used directly as a measure of memory usage per worker. Furthermore, setting a higher limit does not resolve a CPU bottleneck.

To determine a reliable setting, monitor memory usage under a representative load and compare it with the available reserve. Make a conservative adjustment to pm.max_children It should then be reevaluated based on memory, swap, response times, and errors. If the server or database remains under heavy load, increasing parallelism is not necessarily the right solution.

Monitor Utilization and Status Metrics

You can only evaluate a change to PHP-FPM if you know what the situation was like before. Track response times and error rates over a representative period, and compare them after the change to a period that is as similar as possible. Be sure to account for differences in request volume, scheduled tasks, and resource-intensive operations such as imports.

Monitor CPU utilization, available memory, swap activity, and database load simultaneously. If, after increasing the worker limit, the number of concurrently processed requests rises significantly but so do the error rate or database load, the bottleneck may have shifted. FPM warnings help you assess the situation: A message indicating that a limit has been reached max_children-The threshold initially only indicates that the pool has reached its configured capacity.

A protected FPM status page Supplements these observations with data from the queried pool. Among other things, it displays active and free processes as well as the queue. Assign status access to the pool that is actually serving the domain, and restrict it to authorized access: The output may contain sensitive information about requests and processes.

A single query is just a snapshot; brief spikes can occur between two queries. Other status values count events since the FPM started and are reset upon restart. Make a note of such restarts when comparing data so that a low count is not mistakenly interpreted as an improvement.

Examine the metrics in context: A large number of active workers and a growing queue are signs that the pool is at capacity, but they do not explain the cause of long requests. The article on PHP-FPM Status Page for Performance Analysis.

Analyzing Peak Loads and Slow Requests

When a load spike occurs along with the observed symptom, start by determining which resource or part of the application is throttling the requests. The following overview lists some initial troubleshooting steps; it is not a substitute for analyzing the specific application or comparing metrics before and after a change.

Identify FPM bottlenecks and respond cautiously
SymptomCross-checkLow-risk next step
Warning Regarding max_childrenCheck pool utilization, inquiry patterns, and available resourcesIf reserves are sufficient, consider a moderate increase and monitor the situation
Resource Shortage Under Heavy LoadCompare CPU, memory, swap, and database load over time with query volumesInvestigate the source of the load instead of blindly increasing the worker limit
Long shop or CMS requestsCheck for slow application components, the database, and external interfacesIdentify suspicious requests and address their root causes

A max_children warning This can occur because many legitimate requests arrive simultaneously or because individual requests keep workers busy for a long time. Therefore, you should also check for unusual access patterns and potential attacks. If the CPU, memory, and database are already under heavy load, adding more workers may worsen the situation rather than improve response times.

In a shop environment, for example, a slow database query or a waiting external interface can tie up multiple workers at the same time. Compare the affected time periods with application and database monitoring data. Only when the pool limit is actually being reached and the resources involved have spare capacity should you consider a cautious increase.

A Slowlog If FPM is configured appropriately, it can provide a stack trace for requests that take a long time to complete. It shows the execution point at the time of recording, but does not automatically reveal the full cause of the delay. You should cross-reference recurring warnings with additional data before changing code or pool limits.

For further analysis, the article explains the Analyzing the PHP-FPM Slowlog, how to interpret such indicators. For each action, record the baseline value, the time, and your observations: This way, you can attribute any deterioration to a specific change and reverse it in a targeted manner.

Implement and review settings in a sustainable manner

For many small websites, ondemand help avoid having to allocate resources permanently for every pool worker. Nevertheless, capacity planning must still account for simultaneous peak loads across all domains and the memory requirements of other services. A dedicated FPM handler improves the isolation of websites but requires additional memory, among other things, for a separate OPcache.

A rare, resource-intensive import places different demands on the system than ordinary page views. The PHP—memory_limit This limits a script's memory and should not be confused with a worker's total operating system memory. First, check whether the import is actually reaching this limit and how much memory is still available before increasing it.

The OPcache can reuse compiled PHP code. Before making a change, check whether it is active for the handler actually in use and what configuration applies. The cache and the workers compete with other services for memory; therefore, increasing the cache allocation is not an isolated decision.

For multiple subscriptions, PHP settings can be configured via a Service Plan Manage and synchronize. Do not assume that every existing subscription will reflect the updated value: locks and permissions can affect synchronization. Check the affected domains individually after the update.

Also, distinguish between global PHP settings, domain-specific settings, and the values that are actually loaded. After making direct changes to a configuration file, the Plesk interface may display values that differ from the actual settings. Therefore, document any changes and verify their effect in the relevant handler; if a change causes problems, carefully restore the previously saved value and monitor the domain again.

Sources and Current State of Knowledge

Status of the research:

Technical Scope: Plesk Obsidian on Linux; the PHP version, handler, and available settings depend on the specific installation and permissions. Research date: November 16, 2026.

https://docs.plesk.com/en-US/obsidian/administrator-guide/web-hosting/php-management/php-handlers.75145/

https://www.php.net/install.fpm.configuration

https://support.plesk.com/hc/en-us/articles/12377661896343-Websites-on-PHP-FPM-are-unavailable-or-loading-slowly-server-reached-max-children-setting-consider-raising-it

https://support.plesk.com/hc/en-us/articles/12377519572887-How-to-customize-PHP-settings-in-Plesk

https://support.plesk.com/hc/en-us/articles/12377800927127-How-to-find-and-edit-PHP-configuration-files-in-Plesk-for-a-domain-or-for-global-PHP-handler

https://support.plesk.com/hc/en-us/articles/12388475473303-What-does-the-PHP-memory-limit-setting-do

https://www.php.net/manual/en/fpm.status.php

https://support.plesk.com/hc/en-us/articles/12389216713367-Default-value-of-PHP-Settings-for-domains-are-different-from-values-in-global-php-ini

Current articles