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
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
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:nCreate() should eithe r be compatible with php_user_filter:nCreate(): 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:nCreate() should either be compatible with php_user_filter:nCreate(): 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:nClose() should either be compatible with php_user_filter:nClose(): 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:nClose() should either be c ompatible with php_user_filter:nClose(): 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:ush($definiti on) should either be compatible with SplDoublyLinkedList:ush(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:ush($definition) s hould either be compatible with SplDoublyLinkedList:ush(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
Solved! Go to Solution.
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!
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
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
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/