Skip to main content

Apache MaxRequestWorkers and PHP FPM Max Children

Comments

5 comments

  • cPRex Jurassic Moderator
    Hey there!
    1. Though I am in worker mode, the MaxRequestWorkers is set to 150 and system max is 256, much higher than default 16, why? It seems the value is like to be a default for prefork mode.

    cPanel has always used 256 for this limit, and you can read more about the defaults here:
    0
  • chcw
    Hi, cPRex If I understand correct, then: 1. A PHP FPM Child Process is also a Apache Process. 2. The Apache processes = PHP FPM Child Processes for PHP requests + other processes for non PHP requests, such as images, js, CSS, etc. 3. The total requests that Apache can handle = Total requests PHP FPM can handle + Total requests that other processes can handle. If 2 is correct, then MaxRequestWorkers must be > PHP FPM Max Children, otherwise, there will be no available processes for non PHP requests. If 3 is correct, then the total requests Apache can handle = PHP FPM Max Request * Max Children + Other Multi-thread process * Children per thread + Other Single-thread process.
    0
  • cPRex Jurassic Moderator
    That all sounds correct to me!
    0
  • chcw
    Thank you.
    0
  • cPRex Jurassic Moderator
    Sure thing!
    0

Please sign in to leave a comment.