-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Description
Possible cause/result of #8576.
It seems that using several workers (php artisan queue:work --daemon ...
) via supervisor cause the jobs to be picked up by multiple workers at the same time, causing all kinds of havoc.
I have 10 workers in my case, that download a file from an FTP server, save the file itself locally, inserts a row in a database and then delete the original file from the FTP site.
I've experienced several times now, that several rows appear in the database, and sometimes I get an error informing me that the file on the FTP site doesn't exist but the row appears in the database meaning that it has already been processed. I am also pummelled with the redis errors found in #8576 (Predis\Transaction\AbortedMultiExecException
)
I should say that this doesn't happen all the time, only for some jobs...
FYI, I've temporarily reduced the number of workers to 1 and I haven't had a user error since, altho I do still get the Predis errors.
I've tried to reproduce this locally but cannot, it seems that it works as expected. I don't get the Predis error either. The only difference is that I'm using supervisor in production and 10 terminals on my Mac...