cancel
Showing results for 
Search instead for 
Did you mean: 

Site suddenly down. PHP-FPM 503 can't connect. No recent work/updates or .maintenance.flag file

SOLVED

Site suddenly down. PHP-FPM 503 can't connect. No recent work/updates or .maintenance.flag file

Hi,

 

Suddenly my development server went down. I'm not exactly sure when but in the last 28 days. I swear I was on it as I was spec'ing the next projects in the last 2 weeks, but time is a blur sort of right now.

 

The error is:

 

Service Unavailable

PHP did not respond properly to the request. As a result, Apache considers the PHP-FPM service to be unavailable.

Detailed information about this error is available in the app's Apache error log at:

/srv/users/SYSUSER/log/APPNAME/APPNAME_apache.error.log

The root cause of this error is often slow PHP code. You should disable any plugins the app is using and check the app's PHP error log and PHP slow request log located at:

/srv/users/SYSUSER/log/APPNAME/APPNAME_phpX.Y.error.log

/srv/users/SYSUSER/log/APPNAME/APPNAME_phpX.Y.slow.log
 
------end of error------


The php7.2.error log from today shows an errors like these:

[Thu Jan 13 06:39:55.471768 2022] [proxy:error] [pid 4065:tid 139657413117696] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/run/php/php7.2-fpm.sock (localhost) failed

[Thu Jan 13 06:39:55.471826 2022] [proxy_fcgi:error] [pid 4065:tid 139657413117696] [client 45.146.165.37:0] AH01079: failed to make connection to backend: httpd-UDS, referer: http://167.172.150.81:80/Autodiscover/Autodiscover.xml
 
The slow.log is empty.
 
I am familiar with the most common 503 fix which is to delete the .maintenance.flag file in the root/var folder. There is no file there. I've got a ticket in with Digital Ocean, but I'm hoping someone here can help.
 
Lastly, I tried to clear the cache with via shell command, but I got the long list of errors at the end of this message.
 
Does anyone have any clue why this is happening? Due to so many circumstances (COVID) we had suspended development on this until Q1, but it has run on this server for over a year with zero issues.
 
Thanks in advance!
 
Kory
 
------------------errors from command line cache below----------------------

 

PHP Deprecated: Return type of phpseclib_mcrypt_filter::filter($in, $out, &$con sumed, $closing) should either be compatible with php_user_filter::filter($in, $ out, &$consumed, bool $closing): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/users/theframeroom-m2- v2/apps/theframeroom-m2-v2/public/vendor/phpseclib/mcrypt_compat/lib/mcrypt.php on line 1107

Deprecated: Return type of phpseclib_mcrypt_filter::filter($in, $out, &$consumed , $closing) should either be compatible with php_user_filter::filter($in, $out, &$consumed, bool $closing): int, or the #[\ReturnTypeWillChange] attribute shoul d be used to temporarily suppress the notice in /srv/users/theframeroom-m2-v2/ap ps/theframeroom-m2-v2/public/vendor/phpseclib/mcrypt_compat/lib/mcrypt.php on li ne 1107
PHP Deprecated: Return type of phpseclib_mcrypt_filter:Smiley SurprisednCreate() should eithe r be compatible with php_user_filter:Smiley SurprisednCreate(): bool, or the #[\ReturnTypeWill Change] attribute should be used to temporarily suppress the notice in /srv/user s/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/phpseclib/mcrypt_comp at/lib/mcrypt.php on line 1158

Deprecated: Return type of phpseclib_mcrypt_filter:Smiley SurprisednCreate() should either be compatible with php_user_filter:Smiley SurprisednCreate(): bool, or the #[\ReturnTypeWillChang e] attribute should be used to temporarily suppress the notice in /srv/users/the frameroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/phpseclib/mcrypt_compat/li b/mcrypt.php on line 1158
PHP Deprecated: Return type of phpseclib_mcrypt_filter:Smiley SurprisednClose() should either be compatible with php_user_filter:Smiley SurprisednClose(): void, or the #[\ReturnTypeWillCh ange] attribute should be used to temporarily suppress the notice in /srv/users/ theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/phpseclib/mcrypt_compat /lib/mcrypt.php on line 1221

Deprecated: Return type of phpseclib_mcrypt_filter:Smiley SurprisednClose() should either be c ompatible with php_user_filter:Smiley SurprisednClose(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/users/thefr ameroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/phpseclib/mcrypt_compat/lib/ mcrypt.php on line 1221
PHP Fatal error: During inheritance of SplDoublyLinkedList: Uncaught Exception: Deprecated Functionality: Return type of Zend\Di\DefinitionList:Smiley Tongueush($definiti on) should either be compatible with SplDoublyLinkedList:Smiley Tongueush(mixed $value): vo id, or the #[\ReturnTypeWillChange] attribute should be used to temporarily supp ress the notice in /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/ vendor/zendframework/zend-di/src/DefinitionList.php on line 72 in /srv/users/the frameroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/magento/framework/App/Erro rHandler.php:61
Stack trace:
#0 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendframe work/zend-di/src/DefinitionList.php(18): Magento\Framework\App\ErrorHandler->han dler(8192, 'Return type of ...', '/srv/users/thef...', 72)
#1 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/composer/ ClassLoader.php(444): include('/srv/users/thef...')
#2 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/composer/ ClassLoader.php(322): Composer\Autoload\includeFile('/srv/users/thef...')
#3 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendframe work/zend-di/src/Di.php(116): Composer\Autoload\ClassLoader->loadClass('Zend\\Di \\Definit...')
#4 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendframe work/zend-mvc/src/Service/DiFactory.php(43): Zend\Di\Di->__construct()
#5 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendframe work/zend-mvc/src/Service/DiFactory.php(63): Zend\Mvc\Service\DiFactory->__invok e(Object(Zend\ServiceManager\ServiceManager), 'Zend\\Di\\Di')
#6 [internal function]: Zend\Mvc\Service\DiFactory->createService(Object(Zend\Se rviceManager\ServiceManager), 'dependencyinjec...', 'DependencyInjec...')
#7 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendframe work/zend-servicemanager/src/ServiceManager.php(934): call_user_func(Array, Obje ct(Zend\ServiceManager\ServiceManager), 'dependencyinjec...', 'DependencyInjec.. .')
#8 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendframe work/zend-servicemanager/src/ServiceManager.php(1092): Zend\ServiceManager\Servi ceManager->createServiceViaCallback(Array, 'dependencyinjec...', 'DependencyInje c...')
#9 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendframe work/zend-servicemanager/src/ServiceManager.php(634): Zend\ServiceManager\Servic eManager->createFromFactory('dependencyinjec...', 'DependencyInjec...')
#10 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-servicemanager/src/ServiceManager.php(597): Zend\ServiceManager\Servi ceManager->doCreate('DependencyInjec...', 'dependencyinjec...')
#11 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-servicemanager/src/ServiceManager.php(530): Zend\ServiceManager\Servi ceManager->create(Array)
#12 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-mvc/src/Service/DiAbstractServiceFactoryFactory.php(47): Zend\Service Manager\ServiceManager->get('DependencyInjec...')
#13 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-mvc/src/Service/DiAbstractServiceFactoryFactory.php(66): Zend\Mvc\Ser vice\DiAbstractServiceFactoryFactory->__invoke(Object(Zend\ServiceManager\Servic eManager), 'Zend\\ServiceMan...')
#14 [internal function]: Zend\Mvc\Service\DiAbstractServiceFactoryFactory->creat eService(Object(Zend\ServiceManager\ServiceManager), 'zendservicemana...', 'Zend \\ServiceMan...')
#15 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-servicemanager/src/ServiceManager.php(934): call_user_func(Array, Obj ect(Zend\ServiceManager\ServiceManager), 'zendservicemana...', 'Zend\\ServiceMan ...')
#16 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-servicemanager/src/ServiceManager.php(1092): Zend\ServiceManager\Serv iceManager->createServiceViaCallback(Array, 'zendservicemana...', 'Zend\\Service Man...')
#17 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-servicemanager/src/ServiceManager.php(634): Zend\ServiceManager\Servi ceManager->createFromFactory('zendservicemana...', 'Zend\\ServiceMan...')
#18 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-servicemanager/src/ServiceManager.php(597): Zend\ServiceManager\Servi ceManager->doCreate('Zend\\ServiceMan...', 'zendservicemana...')
#19 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-servicemanager/src/ServiceManager.php(530): Zend\ServiceManager\Servi ceManager->create(Array)
#20 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/setup/src/Magen to/Setup/Application.php(66): Zend\ServiceManager\ServiceManager->get('Zend\\Ser viceMan...')
#21 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/setup/src/Magen to/Setup/Application.php(39): Magento\Setup\Application->loadServices(Object(Zen d\ServiceManager\ServiceManager), Array)
#22 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/magento/ framework/Console/Cli.php(80): Magento\Setup\Application->bootstrap(Array)
#23 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/bin/magento(22) : Magento\Framework\Console\Cli->__construct('Magento CLI')
#24 {main} in /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendo r/zendframework/zend-di/src/DefinitionList.php on line 18

Fatal error: During inheritance of SplDoublyLinkedList: Uncaught Exception: Depr ecated Functionality: Return type of Zend\Di\DefinitionList:Smiley Tongueush($definition) s hould either be compatible with SplDoublyLinkedList:Smiley Tongueush(mixed $value): void, o r the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendo r/zendframework/zend-di/src/DefinitionList.php on line 72 in /srv/users/theframe room-m2-v2/apps/theframeroom-m2-v2/public/vendor/magento/framework/App/ErrorHand ler.php:61
Stack trace:
#0 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendframe work/zend-di/src/DefinitionList.php(18): Magento\Framework\App\ErrorHandler->han dler(8192, 'Return type of ...', '/srv/users/thef...', 72)
#1 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/composer/ ClassLoader.php(444): include('/srv/users/thef...')
#2 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/composer/ ClassLoader.php(322): Composer\Autoload\includeFile('/srv/users/thef...')
#3 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendframe work/zend-di/src/Di.php(116): Composer\Autoload\ClassLoader->loadClass('Zend\\Di \\Definit...')
#4 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendframe work/zend-mvc/src/Service/DiFactory.php(43): Zend\Di\Di->__construct()
#5 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendframe work/zend-mvc/src/Service/DiFactory.php(63): Zend\Mvc\Service\DiFactory->__invok e(Object(Zend\ServiceManager\ServiceManager), 'Zend\\Di\\Di')
#6 [internal function]: Zend\Mvc\Service\DiFactory->createService(Object(Zend\Se rviceManager\ServiceManager), 'dependencyinjec...', 'DependencyInjec...')
#7 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendframe work/zend-servicemanager/src/ServiceManager.php(934): call_user_func(Array, Obje ct(Zend\ServiceManager\ServiceManager), 'dependencyinjec...', 'DependencyInjec.. .')
#8 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendframe work/zend-servicemanager/src/ServiceManager.php(1092): Zend\ServiceManager\Servi ceManager->createServiceViaCallback(Array, 'dependencyinjec...', 'DependencyInje c...')
#9 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendframe work/zend-servicemanager/src/ServiceManager.php(634): Zend\ServiceManager\Servic eManager->createFromFactory('dependencyinjec...', 'DependencyInjec...')
#10 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-servicemanager/src/ServiceManager.php(597): Zend\ServiceManager\Servi ceManager->doCreate('DependencyInjec...', 'dependencyinjec...')
#11 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-servicemanager/src/ServiceManager.php(530): Zend\ServiceManager\Servi ceManager->create(Array)
#12 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-mvc/src/Service/DiAbstractServiceFactoryFactory.php(47): Zend\Service Manager\ServiceManager->get('DependencyInjec...')
#13 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-mvc/src/Service/DiAbstractServiceFactoryFactory.php(66): Zend\Mvc\Ser vice\DiAbstractServiceFactoryFactory->__invoke(Object(Zend\ServiceManager\Servic eManager), 'Zend\\ServiceMan...')
#14 [internal function]: Zend\Mvc\Service\DiAbstractServiceFactoryFactory->creat eService(Object(Zend\ServiceManager\ServiceManager), 'zendservicemana...', 'Zend \\ServiceMan...')
#15 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-servicemanager/src/ServiceManager.php(934): call_user_func(Array, Obj ect(Zend\ServiceManager\ServiceManager), 'zendservicemana...', 'Zend\\ServiceMan ...')
#16 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-servicemanager/src/ServiceManager.php(1092): Zend\ServiceManager\Serv iceManager->createServiceViaCallback(Array, 'zendservicemana...', 'Zend\\Service Man...')
#17 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-servicemanager/src/ServiceManager.php(634): Zend\ServiceManager\Servi ceManager->createFromFactory('zendservicemana...', 'Zend\\ServiceMan...')
#18 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-servicemanager/src/ServiceManager.php(597): Zend\ServiceManager\Servi ceManager->doCreate('Zend\\ServiceMan...', 'zendservicemana...')
#19 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/zendfram ework/zend-servicemanager/src/ServiceManager.php(530): Zend\ServiceManager\Servi ceManager->create(Array)
#20 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/setup/src/Magen to/Setup/Application.php(66): Zend\ServiceManager\ServiceManager->get('Zend\\Ser viceMan...')
#21 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/setup/src/Magen to/Setup/Application.php(39): Magento\Setup\Application->loadServices(Object(Zen d\ServiceManager\ServiceManager), Array)
#22 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendor/magento/ framework/Console/Cli.php(80): Magento\Setup\Application->bootstrap(Array)
#23 /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/bin/magento(22) : Magento\Framework\Console\Cli->__construct('Magento CLI')
#24 {main} in /srv/users/theframeroom-m2-v2/apps/theframeroom-m2-v2/public/vendo r/zendframework/zend-di/src/DefinitionList.php on line 18

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Site suddenly down. PHP-FPM 503 can't connect. No recent work/updates or .maintenance.flag file

Turns out that in all likelihood Server Pilot did an update and overwrote some customization.

 

Just putting this here if it helps anyone else.

 

Thanks!

View solution in original post

5 REPLIES 5

Re: Site suddenly down. PHP-FPM 503 can't connect. No recent work/updates or .maintenance.flag file

Hi,
 
Here is an update as I dig through this issue in the case it can help someone else or anyone has a solution with additional information.
 
Digital Ocean got back to me with good info. They recommended I checked to see if the PHP-FPM service was running. I ran the commands and found it was masked, so effectively not running. No clue why it became masked! I removed the mask and restarted it. The status is currently:
 
    ● php7.2-fpm.service - LSB: starts php7.2-fpm
       Loaded: loaded (/etc/init.d/php7.2-fpm; generated)
       Active: active (exited) since Mon 2022-01-17 15:59:30 UTC; 9s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 8396 ExecStart=/etc/init.d/php7.2-fpm start (code=exited, status=0/SUCCESS)
 
The site is still down with the same 503 error. There is a socket connection error you can see in the following from the theframeroom-m2-v2_apache.error.log:
 
[Mon Jan 17 16:26:07.546880 2022] [proxy:error] [pid 1325:tid 140603455166208] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/run/php/php7.2-fpm.sock (localhost) failed
[Mon Jan 17 16:26:07.546941 2022] [proxy_fcgi:error] [pid 1325:tid 140603455166208] [client 69.143.132.65:0] AH01079: failed to make connection to backend: httpd-UDS, referer: https://devframe.theframeroom.com/online-custom-picture-framing-poster-canv…
 
Any insight is appreciated. Thanks in advance.

Re: Site suddenly down. PHP-FPM 503 can't connect. No recent work/updates or .maintenance.flag file

Turns out that in all likelihood Server Pilot did an update and overwrote some customization.

 

Just putting this here if it helps anyone else.

 

Thanks!

Re: Site suddenly down. PHP-FPM 503 can't connect. No recent work/updates or .maintenance.flag file

I faced the same issue, after spending sometime I realized that my php version in my VM got updated to php8 and I was trying to execute the bin/magento setup:di:compile which was giving me error.

To resolve this issue I passed the right PHP version, issue resolved.

php7.4 bin/magento setup:di:compile

Re: Site suddenly down. PHP-FPM 503 can't connect. No recent work/updates or .maintenance.flag file

In case you use Valet to switch PHP versions, I found that sometimes the old socket gets left behind and causes this error in Magento and Laravel projects.

rm ~/.config/valet/valet.sock

usually fixes it, sometimes combined with valet restart

Re: Site suddenly down. PHP-FPM 503 can't connect. No recent work/updates or .maintenance.flag file

I had a similar problem, our server pilot was set to php 8.2 via the server pilot dashboard, but via CLI we only had 8.1 installed.

 

I followed the two commands on the bottom of this page to get our server to 8.1. And once that lined up with the php via the server pilot page, it worked. I am still not totally sure what the difference is or why it occured, but it fixed it.

https://serverpilot.io/docs/how-to-change-the-version-of-the-php-command/