{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/lumen-framework/issues/355","repository_url":"https://api.github.com/repos/laravel/lumen-framework","labels_url":"https://api.github.com/repos/laravel/lumen-framework/issues/355/labels{/name}","comments_url":"https://api.github.com/repos/laravel/lumen-framework/issues/355/comments","events_url":"https://api.github.com/repos/laravel/lumen-framework/issues/355/events","html_url":"https://github.com/laravel/lumen-framework/issues/355","id":131539148,"number":355,"title":"Redis queue : \"Error while reading line from the server\"","user":{"login":"trompx","id":6394620,"avatar_url":"https://avatars3.githubusercontent.com/u/6394620?v=4","gravatar_id":"","url":"https://api.github.com/users/trompx","html_url":"https://github.com/trompx","followers_url":"https://api.github.com/users/trompx/followers","following_url":"https://api.github.com/users/trompx/following{/other_user}","gists_url":"https://api.github.com/users/trompx/gists{/gist_id}","starred_url":"https://api.github.com/users/trompx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trompx/subscriptions","organizations_url":"https://api.github.com/users/trompx/orgs","repos_url":"https://api.github.com/users/trompx/repos","events_url":"https://api.github.com/users/trompx/events{/privacy}","received_events_url":"https://api.github.com/users/trompx/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-02-05T02:44:31Z","updated_at":"2018-02-16T13:47:38Z","closed_at":"2016-02-05T10:07:27Z","author_association":"NONE","body":"Hello,\n\nFirst I am not sure this is a lumen specific error or a Laravel error too.\nI have an app running on laravel (5.1) which dispatch jobs, handled by a lumen (5.1) worker.\n\nI have multiple jobs running totally fine, however, if a job runs more than 60 seconds (I made some tests 59.75727891922s -> no error,  60.091041898727s -> error), I get the following :\n\n`[2016-02-05 02:27:07] lumen.ERROR: exception 'Predis\\Connection\\ConnectionException' with message 'Error while reading line from the server. [tcp://127.0.0.1:6379]' in /var/www/app/vendor/predis/predis/src/Connection/AbstractConnection.php:168\nStack trace:\n#0 /var/www/app/vendor/predis/predis/src/Connection/StreamConnection.php(210): Predis\\Connection\\AbstractConnection->onConnectionError('Error while rea...')\n#1 /var/www/app/vendor/predis/predis/src/Connection/AbstractConnection.php(133): Predis\\Connection\\StreamConnection->read()\n#2 /var/www/app/vendor/predis/predis/src/Connection/AbstractConnection.php(125): Predis\\Connection\\AbstractConnection->readResponse(Object(Predis\\Command\\ZSetRemove))\n#3 /var/www/app/vendor/predis/predis/src/Client.php(326): Predis\\Connection\\AbstractConnection->executeCommand(Object(Predis\\Command\\ZSetRemove))\n#4 /var/www/app/vendor/predis/predis/src/Client.php(310): Predis\\Client->executeCommand(Object(Predis\\Command\\ZSetRemove))\n#5 /var/www/app/vendor/illuminate/queue/RedisQueue.php(154): Predis\\Client->__call('zrem', Array)\n#6 /var/www/app/vendor/illuminate/queue/RedisQueue.php(154): Predis\\Client->zrem('queues:processi...', '{\"job\":\"Illumin...')\n#7 /var/www/app/vendor/illuminate/queue/Jobs/RedisJob.php(73): Illuminate\\Queue\\RedisQueue->deleteReserved('processing', '{\"job\":\"Illumin...')\n#8 /var/www/app/vendor/illuminate/queue/CallQueuedHandler.php(46): Illuminate\\Queue\\Jobs\\RedisJob->delete()\n#9 /var/www/app/vendor/illuminate/queue/Jobs/Job.php(129): Illuminate\\Queue\\CallQueuedHandler->call(Object(Illuminate\\Queue\\Jobs\\RedisJob), Array)\n#10 /var/www/app/vendor/illuminate/queue/Jobs/RedisJob.php(51): Illuminate\\Queue\\Jobs\\Job->resolveAndFire(Array)\n#11 /var/www/app/vendor/illuminate/queue/Worker.php(208): Illuminate\\Queue\\Jobs\\RedisJob->fire()\n#12 /var/www/app/vendor/illuminate/queue/Worker.php(159): Illuminate\\Queue\\Worker->process('redis', Object(Illuminate\\Queue\\Jobs\\RedisJob), '3', 0)\n#13 /var/www/app/vendor/illuminate/queue/Worker.php(111): Illuminate\\Queue\\Worker->pop(NULL, 'processing', 0, '3', '3')\n#14 /var/www/app/vendor/illuminate/queue/Worker.php(87): Illuminate\\Queue\\Worker->runNextJobForDaemon(NULL, 'processing', 0, '3', '3')\n#15 /var/www/app/vendor/illuminate/queue/Console/WorkCommand.php(103): Illuminate\\Queue\\Worker->daemon(NULL, 'processing', 0, 128, '3', '3')\n#16 /var/www/app/vendor/illuminate/queue/Console/WorkCommand.php(71): Illuminate\\Queue\\Console\\WorkCommand->runWorker(NULL, 'processing', 0, 128, true)\n#17 [internal function]: Illuminate\\Queue\\Console\\WorkCommand->fire()\n#18 /var/www/app/vendor/illuminate/container/Container.php(502): call_user_func_array(Array, Array)\n#19 /var/www/app/vendor/illuminate/console/Command.php(150): Illuminate\\Container\\Container->call(Array)\n#20 /var/www/app/vendor/symfony/console/Command/Command.php(259): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#21 /var/www/app/vendor/illuminate/console/Command.php(136): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#22 /var/www/app/vendor/symfony/console/Application.php(878): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#23 /var/www/app/vendor/symfony/console/Application.php(195): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Queue\\Console\\WorkCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#24 /var/www/app/vendor/symfony/console/Application.php(126): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#25 /var/www/app/vendor/laravel/lumen-framework/src/Console/Kernel.php(78): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#26 /var/www/app/artisan(35): Laravel\\Lumen\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#27 {main}\n\n`\n\nI stumble upon this issue https://github.com/nrk/predis/issues/121 but that wasn't that.\n\nI have set an expire time of 120 seconds (https://github.com/laravel/framework/issues/8577), tried to add the `'read_write_timeout' => -1` parameter (http://stackoverflow.com/questions/11776029/predis-is-giving-error-while-reading-line-from-server) in database.php but nothing works.\n\nFor the record, some of the jobs use PhpRedis (no persistent connection) so I don't know if that may conflict with Predis (which seems not as all jobs running under 60s don't trigger the error).\n\nMy worker config in supervisor is the following :\n`\n[program:queue_processing]\ncommand=php artisan queue:work --daemon --sleep=3 --queue=processing --tries=3\nprocess_name=%(program_name)s_%(process_num)02d\nnumprocs=4\nautostart=true\nautorestart=true\n`\n\nLet me know if I can provide more infos.\n"},"comment":{"url":"https://api.github.com/repos/laravel/lumen-framework/issues/comments/366239339","html_url":"https://github.com/laravel/lumen-framework/issues/355#issuecomment-366239339","issue_url":"https://api.github.com/repos/laravel/lumen-framework/issues/355","id":366239339,"user":{"login":"freeman3s","id":23552609,"avatar_url":"https://avatars3.githubusercontent.com/u/23552609?v=4","gravatar_id":"","url":"https://api.github.com/users/freeman3s","html_url":"https://github.com/freeman3s","followers_url":"https://api.github.com/users/freeman3s/followers","following_url":"https://api.github.com/users/freeman3s/following{/other_user}","gists_url":"https://api.github.com/users/freeman3s/gists{/gist_id}","starred_url":"https://api.github.com/users/freeman3s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freeman3s/subscriptions","organizations_url":"https://api.github.com/users/freeman3s/orgs","repos_url":"https://api.github.com/users/freeman3s/repos","events_url":"https://api.github.com/users/freeman3s/events{/privacy}","received_events_url":"https://api.github.com/users/freeman3s/received_events","type":"User","site_admin":false},"created_at":"2018-02-16T13:47:38Z","updated_at":"2018-02-16T13:47:38Z","author_association":"NONE","body":"@shmuelgutman I have fixed it! I've added\r\n`'read_write_timeout' => 0` in config/database.php"}}
{"actor":{"display_login":"freeman3s"}}