DEV Community

Configuring PHP-FPM For High Network Traffic

Jake Casto on January 23, 2018

Maintaining a constant response time on a server with high network traffic while using PHP is probably the hardest & most annoying thing I've...
Collapse
 
azazqadir profile image
Muhammad Azaz Qadir

Manually configuring PHP-FPM with nginx and apache is quite difficult for someone who doesn't have sysadmin experience. They might not even know what is php-fpm. I think it is better to use some tool that automates this process or at least makes it easier.

Collapse
 
jake profile image
Jake Casto

This article wasn’t directed at users who don’t know what PHP-FPM is.

Collapse
 
aliuadepoju profile image
Wuyi Adepoju

Got curious with your comment, what are the automation tools?

Collapse
 
jake profile image
Jake Casto

^ I’d like to know them as well. I use Laravel Forge to provision the server and setup PHP-FPM but I still make configuration changes.

Collapse
 
reedzhao profile image
reedzhao

Your article is full of factual errors about dynamic,ondemand,static. Please fix them.

RTFM:

static  - a fixed number (pm.max_children) of child processes;
ondemand - no children are created at startup. Children will be forked when new requests will connect.
dynamic - the number of child processes are set dynamically based on the following directives.
Collapse
 
luissiqueira profile image
Luis Siqueira

What is your setup?
RAM and CPU?

Collapse
 
jake profile image
Jake Casto

Really depends on the project, I’d always run at least 4GB of RAM and 2 CPU’s. That works great for small-med projects, I believe the server that I referenced in this post had 18GB of RAM and 8 cpu’s I’m not 100% sure.

Collapse
 
adam_kramer02 profile image
Adam_Kramer ( Test Bank and Solution Manual)

so

wht is the best value for

PHP-FPM Pool
Options Max Requests =

Process Idle =

Timeout Max Children=

??