Maarten00
Maarten00

Reputation: 704

'MySQL server has gone away' in Laravel queue worker job

A job on the queue is giving a timeout for a very simple select query. The project is using Laravel 7.4 with Mysql 5.7 and Doctrine 2.10.1.

The error is:

SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

When retrying the job it fails again.

Upvotes: 0

Views: 1216

Answers (1)

Maarten00
Maarten00

Reputation: 704

When using Laravel and Doctrine, sometimes the queue workers lose their database connection. php artisan queue:restart should fix the problem right away.

Upvotes: 0

Related Questions