I have written a correct way to push 50000 pieces of data. Now I take out 10 pieces of data each time and join the queue to push them. However, when I execute about 6000 pieces of data each time, I get stuck. I have to restart before I can continue to run. What’s the reason? Is there a default timeout?
Local environment xampp
This machine is equipped with 8g memory i3-4170 3.7GHz
Is there a log?
No, or I didn’t find it
What do you mean stuck? Why don’t you run?
It is suggested to do the following investigation:
- When “stuck”, check whether there are tasks waiting in the database or queue cache
- Check if the task you added has expired
- Check whether your task process is still running, whether it is stuck due to high CPU consumption, and whether it takes too much memory. Laravel’s default maximum memory footprint is 128 MB, which can be used to
- If it is a system level unexpected termination, you can use the
supervisedAnd other tools can keep the queue alive all the time. Please refer to the official documents for details.
- If all of the above are correct or are not sure whether they have been checked, you can use a simple and crude way to simulate your normal code to add and execute queues, and use ` artisan ‘on the command line queue:listen “To run the queue, output the sequence of each task. Whether it is successful or not, output it in the key steps.
- It will be easier to check with unit testing
The default time is 60 seconds below 5.3 and 30 seconds above 5.3Laravel modify retry_ After / expire solves the problem of queue multiple execution caused by Queue task expiration / timeout