今天升级到laravel 5.6后,我遇到了很多重新错误,都说明:
Error while reading line from the server. [tcp://redis.localhost:6379] {"exception":"[object] (Predis\Connection\ConnectionException(code: 0): Error while reading line from the server. [tcp://redis.localhost:6379] at /var/www/manage.localhost/vendor/predis/predis/src/Connection/AbstractConnection.php:155)
应用程序堆栈包括:
- Laravel 5.6
- Horizon 1.0.6
- Echo 1.3.2
- Laravel Echo Server 1.3.6
一切都在5.5上运行平稳,我发现的所有文档似乎都无法解决这种情况。除了某些缓存使用情况外,外观或在应用程序内的服务容器中没有重新使用。
。其他人遇到过这个吗?我已经三重检查了升级指南以及GitHub发行说明,但没有任何令人怀疑的东西。基于堆栈跟踪,它似乎与地平线相关。
完整堆栈跟踪
#0 /var/www/manage.localhost/vendor/predis/predis/src/Connection/StreamConnection.php(314): Predis\Connection\AbstractConnection->onConnectionError('Error while rea...')
#1 /var/www/manage.localhost/vendor/predis/predis/src/Connection/AbstractConnection.php(120): Predis\Connection\StreamConnection->read()
#2 /var/www/manage.localhost/vendor/predis/predis/src/Connection/AbstractConnection.php(112): Predis\Connection\AbstractConnection->readResponse(Object(Predis\Command\ListPopFirstBlocking))
#3 /var/www/manage.localhost/vendor/predis/predis/src/Client.php(331): Predis\Connection\AbstractConnection->executeCommand(Object(Predis\Command\ListPopFirstBlocking))
#4 /var/www/manage.localhost/vendor/predis/predis/src/Client.php(314): Predis\Client->executeCommand(Object(Predis\Command\ListPopFirstBlocking))
#5 /var/www/manage.localhost/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php(96): Predis\Client->__call('blpop', Array)
#6 /var/www/manage.localhost/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php(108): Illuminate\Redis\Connections\Connection->command('blpop', Array)
#7 /var/www/manage.localhost/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php(230): Illuminate\Redis\Connections\Connection->__call('blpop', Array)
#8 /var/www/manage.localhost/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php(213): Illuminate\Queue\RedisQueue->blockingPop('queues:events')
#9 /var/www/manage.localhost/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php(165): Illuminate\Queue\RedisQueue->retrieveNextJob('queues:events')
#10 /var/www/manage.localhost/vendor/laravel/horizon/src/RedisQueue.php(92): Illuminate\Queue\RedisQueue->pop('events')
#11 /var/www/manage.localhost/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(246): Laravel\Horizon\RedisQueue->pop('events')
#12 /var/www/manage.localhost/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(107): Illuminate\Queue\Worker->getNextJob(Object(Laravel\Horizon\RedisQueue), 'events')
#13 /var/www/manage.localhost/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(101): Illuminate\Queue\Worker->daemon('website_manager', 'events', Object(Illuminate\Queue\WorkerOptions))
#14 /var/www/manage.localhost/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(85): Illuminate\Queue\Console\WorkCommand->runWorker('website_manager', 'events')
#15 [internal function]: Illuminate\Queue\Console\WorkCommand->handle()
#16 /var/www/manage.localhost/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#17 /var/www/manage.localhost/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#18 /var/www/manage.localhost/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#19 /var/www/manage.localhost/vendor/laravel/framework/src/Illuminate/Container/Container.php(564): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#20 /var/www/manage.localhost/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\Container\Container->call(Array)
#21 /var/www/manage.localhost/vendor/symfony/console/Command/Command.php(252): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#22 /var/www/manage.localhost/vendor/laravel/framework/src/Illuminate/Console/Command.php(170): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#23 /var/www/manage.localhost/vendor/symfony/console/Application.php(865): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /var/www/manage.localhost/vendor/symfony/console/Application.php(241): Symfony\Component\Console\Application->doRunCommand(Object(Laravel\Horizon\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /var/www/manage.localhost/vendor/symfony/console/Application.php(143): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /var/www/manage.localhost/vendor/laravel/framework/src/Illuminate/Console/Application.php(88): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 /var/www/manage.localhost/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(121): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#28 /var/www/manage.localhost/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#29 {main}
在 config/database.php 文件中添加此行, redis.default.default key(或您已求解了哪个连接名称(对我来说:
'read_write_timeout' => 0,