Modifiying PHP FPM settings

1 minute read | By Keegan D'Souza

This post will cover how to modify the values of PHP FPM settings for Linux PHP 8 App Services.


If you notice slow performance on your PHP app service and the warning messages similar to the one listed below in your log files you might want to consider modifying these settings.

2023-01-06T16:41:41.955903016Z [06-Jan-2023 16:41:41] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it

For App Service Linux PHP 8 images the below are the PHP-FPM settings that can be modified.

PHP: Configuration - Manual

Oryx/ at main · microsoft/Oryx (


How To

These configuration options can be added as Application Settings.

Configure apps - Azure App Service

App Settings

Testing and Validation

When these settings are applied, the app service image will apply the below lines of code to modify these values within the file /opt/startup/ This file can be viewed from navigating from the app service’s SSH console.

App Service Startup Script

From the SSH console run the top command, to validate the correct number of FPM process are created according to the settings inputed.

top Command OutPut

What should the value of these settings be?

This is dependant on the application and the amount of memory allocated to the app service plan. Below are a few open source articles that can help your team make an informed decision.

The only thing to be aware of is that increasing this setting might raise the memory usage on the app service plan.

We recommend your team monitor the app service plan memory usage when expirementing with this value.

Monitor apps - Azure App Service