How to Adjust PHP Workers in xCloud

Updated November 6, 2026 · 6 min read

Summarize with:
Share:

PHP workers are the PHP processes that handle your site’s requests at the same time. Each request that runs PHP (a page that is not served from cache, a WooCommerce checkout, a WordPress admin screen) needs a free worker. You can change the worker count from Site Settings → PHP Configurations on both NGINX and OpenLiteSpeed servers.

Where you set it depends on your server’s web server:

Server stack Where to set the worker count Extra settings
NGINX FPM settings → PM Max Children Process manager type, spare workers, max requests
OpenLiteSpeed PHP settings → PM Max Children LSAPI settings (Avoid Fork, idle timeouts, connections)

Note: More workers are not always faster. Each worker uses memory, so too many workers on a small server can run it out of RAM and slow down every site on it. Use Auto-tune as your starting point.

Adjust PHP workers on an NGINX server

The FPM settings editor is only available on NGINX servers.

Step 1: Open your site’s settings

In your xCloud dashboard, go to Sites and open the site. Click Site Settings in the left menu. The PHP Configurations card shows the site’s current values, including PHP workers.

Step 2: Open the FPM settings

In the PHP Configurations card, click Edit next to FPM settings. The Manage FPM Configurations window opens.

Click Edit next to FPM settings in the PHP Configurations card of an NGINX site

Step 3: Set PM Max Children and save

Enter the number of workers in PM Max Children, or click Auto-tune to fill in values calculated from your server’s RAM. Then click Save Settings.

Set PM Max Children in the Manage FPM Configurations window of an NGINX site

The same window holds the other process settings:

Field What it controls
Process Manager Type How PHP starts and stops worker processes
PM Start Servers Workers started at launch (dynamic mode)
PM Min Spare Servers / PM Max Spare Servers Idle workers kept ready (dynamic mode)
PM Max Children The most workers the site can run at once
PM Max Requests Requests a worker serves before it is replaced
PM Process Idle Timeout How long an idle worker waits before it shuts down

When the change is saved, the PHP workers value in the PHP Configurations card shows the new number.

Adjust PHP workers on an OpenLiteSpeed server

OpenLiteSpeed runs PHP its own way, so its sites have LSAPI settings instead of FPM settings. You set the worker count under PHP settings, and fine-tune how OpenLiteSpeed starts and keeps PHP processes under LSAPI settings.

Step 1: Open your site’s settings

Go to Sites, open the site, and click Site Settings in the left menu. The PHP Configurations card lists PHP settings, LSAPI settings and OPcache settings.

Step 2: Set PM Max Children

Click Edit next to PHP settings. In the Manage PHP Configurations window, enter the number of workers in PM Max Children, or click Auto-tune to fill in a suggested value. Then click Save Settings.

Set PM Max Children in the Manage PHP Configurations window of an OpenLiteSpeed site

This value is the number of PHP processes OpenLiteSpeed can run for the site at once. When you save, a message confirms PHP configuration updated successfully. The change can take a little while to apply on the server.

Step 3 (optional): Tune the LSAPI settings

Click Edit next to LSAPI settings.

Click Edit next to LSAPI settings in the PHP Configurations card of an OpenLiteSpeed site

In the Manage LSAPI Configurations window, fill in only the fields you want to change and click Save Settings. Leave a field empty to keep your server’s value, or xCloud’s default if the server has none. A message confirms LSAPI settings updated successfully.

The LSAPI fields in the Manage LSAPI Configurations window of an OpenLiteSpeed site

Field What it does Accepted values
Avoid Fork (LSAPI_AVOID_FORK) Memory left free before OpenLiteSpeed stops starting new PHP processes A size such as 200M or 1G, or 0 to turn it off. Default: 200M
Max Idle (LSAPI_MAX_IDLE) Seconds an idle PHP process stays alive before it exits 0 to 86400. Empty uses the server’s value, or the OpenLiteSpeed default if none is set
Process Group Max Idle (LSAPI_PGRP_MAX_IDLE) Seconds before OpenLiteSpeed shuts down a site’s whole set of idle PHP processes 0 to 86400. Empty uses the server’s value, or the OpenLiteSpeed default if none is set
Max Connections (maxConns) PHP connections each OpenLiteSpeed web server process can open 1 to 10000. Empty uses the server setting, or a share of PM Max Children that xCloud works out for you
Persistent Connection Timeout (pcKeepAliveTimeout) Seconds an idle connection to PHP stays open -1 (no timeout) to 86400. Empty uses the server setting, or the OpenLiteSpeed default

Max Connections is not the number of workers. If you leave it empty, xCloud splits your PHP workers evenly across OpenLiteSpeed’s web server processes (usually one per CPU core, up to 8), so you rarely need to change it.

How Auto-tune picks a value

Auto-tune reads your server’s RAM, keeps part of it for the system and other services, and divides the rest by the memory one PHP worker uses on that server. The result is kept between 5 and 200 workers.

Auto-tune only fills in the form. Nothing changes until you click Save Settings, so you can lower the value if several busy sites share the server. The value applies to the one site you are editing.

What happens when xCloud rebuilds the OpenLiteSpeed configuration

xCloud rewrites a site’s OpenLiteSpeed configuration when it needs to, for example after you save LSAPI settings. Here is what survives:

  • Kept: the worker count the site is using now, and every value you saved in LSAPI settings.
  • Replaced: other PHP process settings you changed by hand in the site’s generated OpenLiteSpeed configuration files. To look at the server’s OpenLiteSpeed setup, use OpenLiteSpeed WebAdmin, but keep PHP worker changes in the dashboard.

If you tuned other PHP settings by hand before, enter the same values in the dashboard so they are not lost on the next rebuild.

Signs a site needs more PHP workers

When every worker is busy, new requests wait in a queue. You’ll typically see:

  • pages that load slowly or time out under traffic, while cached pages stay fast
  • the WordPress admin, page builders or checkout hanging when many requests run at once
  • 502 or 503 errors during busy periods

Before you raise the count, check the server’s memory on the server monitoring page. If RAM is already nearly full, more workers make things worse. Reduce slow requests (caching, heavy plugins) or move to a larger server instead.

Workers that are set too low cause problems too. xCloud does not accept a PM Max Children value below 3, because too few workers leave requests waiting.

Choosing the right number

There is no single right number. It depends on how much RAM your server has, how many sites share it, and how heavy each request is.

  • Start with Auto-tune. It sizes the count to your server’s memory.
  • Change in small steps. Raise or lower the count by one or two, then watch the site and the server’s RAM and CPU for a while.
  • Share the memory. Several sites on one server each get their own workers. Give busy sites more and quiet sites less, rather than raising every site.

To change other PHP limits such as memory and upload size, see how to configure PHP settings. To keep compiled PHP in memory so each worker does less, see OPcache. If you run an older OpenLiteSpeed server, also apply the PHP worker security patch.

Frequently asked questions

Can I adjust PHP workers on an OpenLiteSpeed server?

Yes. On OpenLiteSpeed, set PM Max Children under PHP settings in the site’s PHP Configurations. The FPM settings editor is for NGINX sites only, and OpenLiteSpeed sites get LSAPI settings instead.

What is the lowest number of PHP workers I can set?

  1. xCloud does not accept a PM Max Children value below 3, because too few workers leave requests waiting.

Will my OpenLiteSpeed LSAPI values be lost when xCloud rebuilds the site’s configuration?

No. When xCloud rebuilds the site’s OpenLiteSpeed configuration, it keeps the worker count the site is using now and every value you saved in LSAPI settings. Other changes made by hand to the generated configuration files are replaced, so make your changes in the dashboard.

Does Auto-tune apply the values right away?

No. Auto-tune only fills in suggested values based on your server’s RAM. Review them, then click Save Settings to apply them.

Still stuck? Contact our dedicated support team for assistance with your queries.