search

Home  >  Q&A  >  body text

php - laravel queue stops monitoring after executing for a period of time. What is the reason?

Use laravel queue to process WeChat payment notifications.
When using the queue listening command, the queue executes normally. (The command is php artisan queue:listen).
Use database driver.
After executing the queue monitoring, close the server terminal. If there is a new task at this time, the queue will still be executed.
But after a while, about an hour. The queue is no longer executed, and many tasks have accumulated in the database. If you continue to execute the monitoring command at this time, the accumulated tasks will be executed and cleared from the task table.
I have the following questions:
1. Is the above phenomenon normal? Or is there something wrong with my configuration?
2. If the above phenomenon is normal, is there any way to keep the queue monitoring from stopping and execute it whenever there are new tasks?
3. The previous debugging was due to a program problem, which caused the execution of the queue task to fail. It stopped after trying (attempts field) 255 times, and did not enter the failed task list after stopping. Can this number of attempts be configured? How to enter the failed task list after reaching this number of attempts?

过去多啦不再A梦过去多啦不再A梦2730 days ago1253

reply all(1)I'll reply

  • 黄舟

    黄舟2017-07-06 10:38:44

    Refer to the official documentation: https://docs.golaravel.com/do...

    reply
    0
  • Cancelreply