FastCGI setup for PHP 7.4
I'm trying to squeeze out just a bit more performance and I know that FastCGI is a bit faster. So how do I go about setting up FastCGI for PHP 7.4? I'm running a forum software (PHP script). Most of the articles I find on the internet and here do not cover the newest PHP 7.4 and typically the article states a directory that doesn't exist. I'm using cPanel/WHM 92.0.7.
-
No. It didn't. I can flip on the FastCGI in the PHP controls but still run in CGI mode. So how do you configure the Fast CGI to be used because so far I've never found a way. It continues to show ZERO FastCGI proecesses. There is configuration in a file or something that has to be set up. mod_fcgid status: Total FastCGI processes: 0 0 -
Thanks for the additional details. Can you let me know specifically where you are checking the total process numbers on your system? 0 -
Under WHM go to Server Status got to Apache Status. Then at the bottom of the page is mod_fcgid status: Total FastCGI processes: 0 Under WHM go to MultiPHP Manager I've got PHP 7.4 running with the PHP handler set to fcgi. Under PHP Info if you look at $_SERVER['GATEWAY_INTERFACE'> it reports back only CGI/1.1 As far as I can find FastCGI is not running. I never see process move off ZERO even with Apache Benchmark running 2,000 connections in batches of 200. 0 -
Thanks for the clear details :D I changed the PHP handler for one of my versions to fcgi, and confirmed there is a domain using that version of PHP. I checked a PHP info page on that domain and it did list fcgi as the process: so I'm wondering if the handler isn't properly switching for that version of PHP since you're not even getting to that point. In my WHM >> Apache Status page I see the numbers instantly increased for the CGI processes as I navigated the site. Do you see any errors in the /etc/apache2/logs/error_log or /usr/local/cpanel/logs/error_log files when you make the switch to the fcgi handler in WHM? It seems like that is the most likely spot where there is a failure. If not, it might be best to submit a ticket so we can do some testing directly on that machine. 0 -
n my WHM >> Apache Status page I see the numbers instantly increased for the CGI processes as I navigated the site.
No. Always ZERO process. Then Server API like your only shows CGI/1.1... AH00489: Apache/2.4.46 (cPanel) OpenSSL/1.1.1h mod_bwlimited/1.4 mod_fcgid/2.3.9 configured -- resuming normal operations [Wed Dec 09 17:52:57.659525 2020] [mpm_event:notice] [pid 15479:tid 47239526519872] AH00489: Apache/2.4.46 (cPanel) OpenSSL/1.1.1h mod_bwlimited/1.4 mod_fcgid/2.3.9 configured -- resuming normal operations [Wed Dec 09 17:52:57.659574 2020] [core:notice] [pid 15479:tid 47239526519872] AH00094: Command line: '/usr/sbin/httpd' [Wed Dec 09 17:53:04.767434 2020] [proxy_fcgi:error] [pid 15574:tid 47239839979264] [client xx.xx.xx.xx:58370] AH01067: Failed to read FastCGI header [Wed Dec 09 17:53:04.767472 2020] [proxy_fcgi:error] [pid 15574:tid 47239839979264] (104)Connection reset by peer: [client xx.xx.xx.xx:58370] AH01075: Error dispatching request to : [Wed Dec 09 17:53:04.768239 2020] [proxy:error] [pid 15574:tid 47239839979264] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /opt/cpanel/ea-php74/root/usr/var/run/php-fpm/e31f88d129d69c880a9bb4bfdbc9cad2a2d59e4f.sock (*) failed [Wed Dec 09 17:53:04.768258 2020] [proxy_fcgi:error] [pid 15574:tid 47239839979264] [client xx.xx.xx.xx:58370] AH01079: failed to make connection to backend: httpd-UDS [Thu Dec 10 20:18:58.731349 2020] [proxy_fcgi:error] [pid 82100:tid 47239829473024] (70007)The timeout specified has expired: [client xx.xx.xx.xx:57233] AH01075: Error dispatching request to : (reading input brigade), referer: wipers [Thu Dec 10 20:25:25.788309 2020] [proxy_fcgi:error] [pid 82100:tid 47239795853056] (70007)The timeout specified has expired: [client xx.xx.xx.xx:57242] AH01075: Error dispatching request to : (reading input brigade), referer: wipers This is what I found in the logs (snip).0 -
In my hunting I found the listen string misconfigured... It's missing the address and port in the folder - /opt/cpanel/ea-php74/root/etc/php-fpm.d listen = /opt/cpanel/ea-php74/root/usr/var/run/php-fpm/xxxx.sock So how do I figure out the listening port and address? From PHP.net - Valid syntaxes are: 'ip.add.re.ss:port', 'port', '/path/to/unix/socket'. 0 -
Ok. after playing for a bit I managed to crash the site. So I was close to having it but no sure of the port and address. The Apache side need the info (port and address) and the PHP-FPM pool. There is for sure a disconnect between the two and not passing info. 0 -
That's what I was getting at when I mentioned that something wasn't being configured properly. You shouldn't need to do anything with those files, or even know they exist, in order for things to just work. For this issue it would be best to submit a ticket so we can see what's up and possibly prevent this in the future. If you do submit a ticket, please post the number here so I can follow along and keep the community updated as well. 0 -
Ummm... I need to contact Liquid Web first I guess after doing the support ticket... 0 -
You can do that directly from the WHM >> Create a Support Ticket interface. Just post the number here once you've done that! 0 -
I've got Liquid Web started at my end... So I'll let them try. 0 -
Sounds good! 0 -
Were you able to get it fixed! Care to share the fix? 0
Please sign in to leave a comment.
Comments
14 comments