Control Web Panel
WebPanel => PHP => Topic started by: AltairMed on June 24, 2021, 06:04:55 PM
-
Hello,
I hope you're doing well,
I've installed PHP FPM 7.4, And I've set this configurations for each user :
pm = dynamic
pm.max_children = 150
pm.start_servers = 20
pm.min_spare_servers = 10
pm.max_spare_servers = 20
pm.max_requests = 0
request_terminate_timeout = 0
For Apache :
Timeout 86400
ProxyTimeout 86400
And :
<IfModule proxy_fcgi_module>
ProxyTimeout 86400
<FilesMatch \.php$>
SetHandler "proxy:unix:/opt/alt/php-fpm74/usr/var/sockets/user.sock|fcgi://localhost"
</FilesMatch>
</IfModule>
But the script exicuted for 120-240 seconds and I got that message : Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
I've worked already with same configs but I don't know what happened :(
Please help me to solve this problem,
Thank you,
-
if you are using nginx then you would need to edit nginx conf also.
-
Are you using Apache only or Nginx, or a combo?
If Apache only, 503 error usually means you did not setup proxy app correctly. What is output of
cat /usr/local/apache/logs/error_log | grep :error
Do you have any users that you didn't apply this configuration to?
Are those sites working OK?
-
Hello again,
Thank you all for your reply,
I use apache only with php fpm ..
For the error logs I got :
[Fri Jun 25 14:30:53.169518 2021] [proxy_fcgi:error] [pid 31228:tid 140611063580416] [client 160.177.150.239:10610] AH01067: Failed to read FastCGI header
[Fri Jun 25 14:30:53.169605 2021] [proxy_fcgi:error] [pid 31228:tid 140611063580416] (104)Connection reset by peer: [client 160.177.150.239:10610] AH01075: Error dispatching request to :
I exicute script correctly, but after 240 seconds I got *Service Unavailable* even I've set 84000 as a timeout for apache & for proxy_fcgi_module and I've disabled :
#LoadModule reqtimeout_module modules/mod_reqtimeout.so
Thank you
-
Are you using WordPress?
If so, make sure you are running only 1 version of PHP-FPM.
Also in your php.ini, make sure opcache.fast_shutdown=0 is not commented out. By Default it is.
-
Hello Starburst,
Thank you for your reply,
No, I don't use Wordpress, I work on a web crawler and I want it to work all time ..
My VPS :
CPU Model: AMD EPYC 7282 16-Core Processor
CPU Details: 10 Core (2800 MHz)
RAM: 60 GBs
For opcache.fast_shutdown=0 I did not installed it ..
I really don't know what happened :(
-
Is opcache.fast_shutdown=0 uncommented in the php.ini?
Be default it is commented out.
Also check out:
https://bobcares.com/blog/apache-error-failed-to-read-fastcgi-header/
Other than that I'm out of ideas. ???