Answer the question
In order to leave comments, you need to log in
Restarting Laravel jobs. How to overcome?
There is a script that runs for about 5-8 minutes, everything works fine on the local computer, but on the server the script is executed 3 times with an interval of 90 seconds.
Queue settings:
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => 'default',
'retry_after' => 900,
'block_for' => null,
],
artisan queue:work redis --timeout=900 --sleep=3 --tries=3
Answer the question
In order to leave comments, you need to log in
I will answer myself,
everything turned out to be much simpler, the worker timeout and the retry_after timeout were the same, after I raised the retry_after value to 920 - everything worked as it should
Logs should indicate the reason for what is happening. Perhaps there is a problem with the connection to Redis (DBMS available?) and then there are 3 unsuccessful attempts.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question