2
votes

We used to run Laravel 5.2, and for one of our processing tasks, we'd run a console command to queue up a job into a Redis queue. Prior to the Laravel 5.4 upgrade, this job would queue up and would get picked up by a queue daemon and would only run once. After the upgrade, however, the job gets picked up twice, about 1 minute apart. There have been zero devops changes so I am trying to figure out what Laravel is doing differently. I can also verify that the console command only queues up the job once, so there is something that has changed with how the daemons are running. Has anyone else seen behavior like this?

1
What's your server stack? Is it on EC2 and running multiple instances?tintinboss
One EC2 worker with two daemons that can pull the job out of the queue, which is the same as before L5.4. The job is run once then run again about 1 minute later.Joel Joel Binks

1 Answers

6
votes

Just read this today. Don't know if it will help help.

From the docs:

"The --timeout value should always be at least several seconds shorter than your
retry_after configuration value. This will ensure that a worker processing a given job is always killed before the job is retried. If your --timeout option is longer than your retry_after configuration value, your jobs may be processed twice."

https://laravel.com/docs/5.6/queues#queue-workers-and-deployment