Skip to main content

PHP-FPM- Error dispatching request to

Comments

10 comments

  • cPanelMichael
    Hello James, I recommend searching the PHP-FPM error logs (/opt/cpanel/ea-php$$/root/usr/var/log/php-fpm/error.log) for any domain name's reaching the max_children limit. You'd replace ea-php$$ with each specific version of PHP (e.g. ea-php70) that PHP-FPM is utilized with on your system. The offending entries will look like this: ERROR: unable to read what child say: Bad file descriptor (9) NOTICE: [pool domain_tld] child 1234 exited with code 0 after 25.12345 seconds from start
    If you find specific domain names are reaching the limit, you can increase the max_children value for them using the "Pool Options" feature in "WHM >> MultiPHP Manager". Thank you.
    0
  • James.Simpson
    Hi Michael, I have checked in that file, and there are no errors being displayed at all, just the start up features. I currently have: PHP-FPM: max-children: 100 Process Idle Timeout: 90 Max Requests: 1000 Apache: Start Servers: 15 Min Spare: 20 Max Spare: 35 Server Limit: 300 Max Request Workers: 200 Keepalive: Off Keepalive-timeout: 7 Max Keepalive requests: 150 Timeout: 300 Pre VirtualHost Include timeout 300 ProxyTimeout 300 ##Apache Event Default Settings (overrides main httpd.conf) KeepAlive On KeepAliveTimeout 2 MaxKeepAliveRequests 75 ThreadsPerChild 25 ServerLimit 16 MaxRequestWorkers 400 StartServers 6 MinSpareThreads 150 MaxSpareThreads 400 MaxRequestsPerChild 0 FcgidMaxRequestsPerProcess 10000 FcgidMinProcessesPerClass 0 FcgidMaxProcessesPerClass 120 FcgidMaxProcesses 2000 FcgidProcessLifeTime 300 FcgidIOTimeout 300 FcgidIdleTimeout 60 FcgidIdleScanInterval 60 FcgidBusyTimeout 3600 FcgidConnectTimeout 10 FcgidBusyScanInterval 100 FcgidErrorScanInterval 3 FcgidZombieScanInterval 3 FcgidOutputBufferSize 0 FcgidZombieScanInterval 5 FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 10000 FcgidMaxRequestLen 20468982
    It seems if processes seem to get stuck and just sits there loading until it times out.
    0
  • Anoop P Alias
    Please try changing the Apache httpd MPM from event to prefork. see if that helps
    0
  • James.Simpson
    Apache is currently running on mod_mpm_worker
    0
  • Anoop P Alias
    Do you get error in worker as well?. If yes switch to prefork
    0
  • cPanelMichael
    timeout 300 ProxyTimeout 300

    Hello James, You can try increasing both of these values from "300" to a higher number such as "500" to see if the issue continues. Ensure to monitor Apache's performance after making the change as sometimes a timeout is a good thing since it can prevent Apache from overloading the server. Thank you.
    0
  • James.Simpson
    Hi Michael, I'm not sure if that may be the issue or not - it seems like a sometimes a process may get stuck, as it will wait till 300+ seconds sometimes for a user when they are just trying to load a page, as if somehthing is hogging all the connections? Even though other users can fly through the website without any issues. I'm struggling to find out what it is at all, as a script shouldnt be running for more than 300 seconds to view a single page?
    0
  • cPanelMichael
    Hello James, You can open a
    0
  • James.Simpson
    I think it may be server configuration somehwere to be fair. So what looks like is happening, sometimes when clicking on a link, it will load instantly as it should, but then randomly every now and then, it will just load the page until maximum execution time is hit, and then finally load the page. So for example just now, i've been browsing the website fine, and then i clicked on one link, and it took 290 seconds to load the page. Now after its loaded all the rest of the site is fine again. Not sure what can cause this so randomly - server load isnt massive, and I can see idle processes in apache waiting for a connection. Mysql isnt processing anything either....
    0
  • cPanelMichael
    So for example just now, i've been browsing the website fine, and then i clicked on one link, and it took 290 seconds to load the page. Now after its loaded all the rest of the site is fine again. Not sure what can cause this so randomly - server load isnt massive, and I can see idle processes in apache waiting for a connection. Mysql isnt processing anything either....

    Hello James, We'd need access to the affected system to reproduce this behavior and determine if there are any obvious reasons for the increased page load time. Are you able to open a support ticket so we can take a closer look? Thank you.
    0

Please sign in to leave a comment.