Score:0

Optimize PHP-FPM options for performance

gb flag

PHP-FPM is great for heavy-loaded sites, but it is not clear how to configure it properly for performance.

In the PHP-FPM Pool options, we have fields:

Max Requests (default: 20)

Max Children (default: 5)

Process Idle Timeout (default: 10)

How do we optimize these settings for best performance?

In my example, I set these to:

Max Requests: 350
Max Children: 35
Process Idle Timeout: 100

But received connection problems when having spikes in traffic. What's the approach here?

us flag
The "Max Children" is quite low. Your question doesn't contain enough information for a proper answer. The limits need to be decided based on availability of memory, average memory usage of your workers etc.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.