horizon: RuntimeException - Unable to write output.
- Horizon Version: 3.6.0
- Laravel Version: 6.14.0
- PHP Version: 7.4.2
- Redis Driver & Version: predis/phpredis 5.1.1
- Database Driver & Version: MySQL 8.0.17
Description:
We did an simultaneous upgrade from CentOS 7 to 8 and from PHP 7.3 to 7.4 and we started to get Symfony\Component\Console\Exception\RuntimeException - Unable to write output exceptions from the Horizon Supervisor. Sometimes restarting Horizon or rebooting the machine fixes the issue for a while. I have no idea what might be causing this.
Stacktrace:
Symfony\Component\Console\Exception\RuntimeException Unable to write output.
/var/www/projectname/releases/7/vendor/symfony/console/Output/StreamOutput.php:79 Symfony\Component\Console\Output\StreamOutput::doWrite
/var/www/projectname/releases/7/vendor/symfony/console/Output/Output.php:166 Symfony\Component\Console\Output\Output::write
/var/www/projectname/releases/7/vendor/symfony/console/Style/OutputStyle.php:56 Symfony\Component\Console\Style\OutputStyle::write
/var/www/projectname/releases/7/vendor/symfony/console/Style/SymfonyStyle.php:395 Symfony\Component\Console\Style\SymfonyStyle::write
/var/www/projectname/releases/7/vendor/laravel/horizon/src/Console/SupervisorCommand.php:83 Laravel\Horizon\Console\SupervisorCommand::Laravel\Horizon\Console\{closure}
[internal] call_user_func
/var/www/projectname/releases/7/vendor/laravel/horizon/src/Supervisor.php:471 Laravel\Horizon\Supervisor::output
/var/www/projectname/releases/7/vendor/laravel/horizon/src/Supervisor.php:134 Laravel\Horizon\Supervisor::Laravel\Horizon\{closure}
[internal] call_user_func
/var/www/projectname/releases/7/vendor/laravel/horizon/src/ProcessPool.php:165 Laravel\Horizon\ProcessPool::Laravel\Horizon\{closure}
/var/www/projectname/releases/7/vendor/symfony/process/Process.php:1328 Symfony\Component\Process\Process::Symfony\Component\Process\{closure}
/var/www/projectname/releases/7/vendor/symfony/process/Process.php:1441 Symfony\Component\Process\Process::readPipes
/var/www/projectname/releases/7/vendor/symfony/process/Process.php:1359 Symfony\Component\Process\Process::updateStatus
/var/www/projectname/releases/7/vendor/symfony/process/Process.php:854 Symfony\Component\Process\Process::isRunning
/var/www/projectname/releases/7/vendor/laravel/horizon/src/ProcessPool.php:297 Laravel\Horizon\ProcessPool::Laravel\Horizon\{closure}
[internal] array_filter
/var/www/projectname/releases/7/vendor/laravel/framework/src/Illuminate/Support/Arr.php:611 Illuminate\Support\Arr::where
/var/www/projectname/releases/7/vendor/laravel/framework/src/Illuminate/Support/Collection.php:352 Illuminate\Support\Collection::filter
/var/www/projectname/releases/7/vendor/laravel/horizon/src/ProcessPool.php:298 Laravel\Horizon\ProcessPool::runningProcesses
/var/www/projectname/releases/7/vendor/laravel/framework/src/Illuminate/Support/HigherOrderCollectionProxy.php:60 Illuminate\Support\HigherOrderCollectionProxy::Illuminate\Support\{closure}
[internal] array_map
/var/www/projectname/releases/7/vendor/laravel/framework/src/Illuminate/Support/Collection.php:638 Illuminate\Support\Collection::map
/var/www/projectname/releases/7/vendor/laravel/framework/src/Illuminate/Support/HigherOrderCollectionProxy.php:61 Illuminate\Support\HigherOrderCollectionProxy::__call
/var/www/projectname/releases/7/vendor/laravel/horizon/src/Supervisor.php:232 Laravel\Horizon\Supervisor::terminate
/var/www/projectname/releases/7/vendor/laravel/horizon/src/ListensForSignals.php:52 Laravel\Horizon\Supervisor::processPendingSignals
/var/www/projectname/releases/7/vendor/laravel/horizon/src/Supervisor.php:292 Laravel\Horizon\Supervisor::loop
/var/www/projectname/releases/7/vendor/laravel/horizon/src/Supervisor.php:267 Laravel\Horizon\Supervisor::monitor
/var/www/projectname/releases/7/vendor/laravel/horizon/src/Console/SupervisorCommand.php:92 Laravel\Horizon\Console\SupervisorCommand::start
/var/www/projectname/releases/7/vendor/laravel/horizon/src/Console/SupervisorCommand.php:67 Laravel\Horizon\Console\SupervisorCommand::handle
[internal] call_user_func_array
/var/www/projectname/releases/7/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}
/var/www/projectname/releases/7/vendor/laravel/framework/src/Illuminate/Container/Util.php:36 Illuminate\Container\Util::unwrapIfClosure
/var/www/projectname/releases/7/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:90 Illuminate\Container\BoundMethod::callBoundMethod
/var/www/projectname/releases/7/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:34 Illuminate\Container\BoundMethod::call
/var/www/projectname/releases/7/vendor/laravel/framework/src/Illuminate/Container/Container.php:590 Illuminate\Container\Container::call
/var/www/projectname/releases/7/vendor/laravel/framework/src/Illuminate/Console/Command.php:173 Illuminate\Console\Command::execute
/var/www/projectname/releases/7/vendor/symfony/console/Command/Command.php:255 Symfony\Component\Console\Command\Command::run
/var/www/projectname/releases/7/vendor/laravel/framework/src/Illuminate/Console/Command.php:160 Illuminate\Console\Command::run
/var/www/projectname/releases/7/vendor/symfony/console/Application.php:1012 Symfony\Component\Console\Application::doRunCommand
/var/www/projectname/releases/7/vendor/symfony/console/Application.php:272 Symfony\Component\Console\Application::doRun
/var/www/projectname/releases/7/vendor/symfony/console/Application.php:148 Symfony\Component\Console\Application::run
/var/www/projectname/releases/7/vendor/laravel/framework/src/Illuminate/Console/Application.php:93 Illuminate\Console\Application::run
/var/www/projectname/releases/7/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:131 Illuminate\Foundation\Console\Kernel::handle
/var/www/projectname/releases/7/artisan:35 [main]
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 24 (12 by maintainers)
Someone noted on the Symfony issue that the problem is with the latest PHP 7.4 release. So I’m going to close this as it has nothing to do with Horizon itself. Best to follow up on either the Symfony or PHP issue report.
https://github.com/symfony/symfony/issues/36166#issuecomment-602503225
For those following this issue, the fix for this was released on following Symfony releases. So running composer update should update symfony/process.
Release v3.4.39 Release v4.4.7 Release v5.0.7