-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Queue worker daemon loses connection when unserializing model #16312
Comments
What is the database driver? |
Below are details from database.php 'mysql' => [ |
The presence of |
yes I am using database as a queue driver |
5.0 is technically not supported anymore, I highly recommend that you upgrade to 5.1 or 5.3, a lot of fixes has been introduced. |
Description:
It occurs in case of longer running Queue Jobs.
Log message part
#38 {main}
Next exception 'Illuminate\Database\QueryException' with message 'Error while sending STMT_PREPARE packet. PID=3291 (SQL: select * from
manage_campaigns
wheremanage_campaigns
.id
= 9 limit 1)' in /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624Stack trace:
#0 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('select * from
...', Array, Object(Closure)) #1 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Database/Connection.php(297): Illuminate\Database\Connection->run('select * from
...', Array, Object(Closure))#2 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(1377): Illuminate\Database\Connection->select('select * from `...', Array, true)
#3 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(1367): Illuminate\Database\Query\Builder->runSelect()
#4 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(1354): Illuminate\Database\Query\Builder->getFresh(Array)
#5 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(380): Illuminate\Database\Query\Builder->get(Array)
#6 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(162): Illuminate\Database\Eloquent\Builder->getModels(Array)
#7 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(136): Illuminate\Database\Eloquent\Builder->get(Array)
#8 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(84): Illuminate\Database\Eloquent\Builder->first(Array)
#9 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(114): Illuminate\Database\Eloquent\Builder->find(9, Array)
#10 [internal function]: Illuminate\Database\Eloquent\Builder->findOrFail(9)
#11 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(3362): call_user_func_array(Array, Array)
#12 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Queue/SerializesModels.php(65): Illuminate\Database\Eloquent\Model->__call('findOrFail', Array)
#13 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Queue/SerializesModels.php(65): App\Models\ManageCampaign->findOrFail(9)
#14 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Queue/SerializesModels.php(40): App\Commands\InitiateCampaignRequest->getRestoredPropertyValue(Object(Illuminate\Contracts\Database\ModelIdentifier))
#15 [internal function]: App\Commands\InitiateCampaignRequest->__wakeup()
#16 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(36): unserialize('O:36:"App\Comma...')
#17 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(126): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\DatabaseJob), Array)
#18 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Queue/Jobs/DatabaseJob.php(48): Illuminate\Queue\Jobs\Job->resolveAndFire(Array)
#19 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(207): Illuminate\Queue\Jobs\DatabaseJob->fire()
#20 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(159): Illuminate\Queue\Worker->process('database', Object(Illuminate\Queue\Jobs\DatabaseJob), '1', 0)
#21 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(113): Illuminate\Queue\Worker->pop('database', 'initiateCampaig...', 0, 3, '1')
#22 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(85): Illuminate\Queue\Worker->runNextJobForDaemon('database', 'initiateCampaig...', 0, 3, '1')
#23 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(104): Illuminate\Queue\Worker->daemon('database', 'initiateCampaig...', 0, 128, 3, '1')
#24 /var/www/html/application/deploy/releases/20161103111929/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(70): Illuminate\Queue\Console\WorkCommand->runWorker('database', 'initiateCampaig...', 0, 128, true)
Similar issue addressed here #10604 on this thread,
I hope applying same patch could resolve the issue here also for laravel 5.0 verison
Please move the above patch for 5.0 versions of laravel too.
Thanks,
Abhishek
The text was updated successfully, but these errors were encountered: