Laravel Artisan _命令重新启动并在20分钟后停止
I have a question about the "command" of the Laravel artisan.
When I execute my command (massive adding data to a database with long processing processes), it stops after about twenty minutes without being finished.
Moreover, after about twenty insertions, the command restarts itself without being finished and restarts the process of adding data (it is variable, sometimes after 15 records).
To be clear, when executing the command, I don't do a cron like "->everyminute()'.
Do you have an idea to solve this problem? Is it a memory, timeout, cron or synchronicity problem ?
Thank you to you Have a good day
我对Laravel工匠的“命令 em>”有疑问。 p>
当我执行我的命令(大量向具有长处理过程的数据库添加数据)时,在大约20分钟后停止 strong>而没有完成。 p>
此外,在大约二十次插入后,命令重新启动 strong>而没有完成,并重新开始添加数据的过程(它是可变的,有时是在15条记录之后)。 p>
要明确的是,在执行命令时,我不会像“ - > everyminute() em>”这样的cron。 p>
你有想法解决这个问题吗?它是一个内存,超时,cron或同步问题吗? strong> p>
谢谢你
祝你有个美好的一天 p>
div>
Hey you need a Job which you dispatch in the console command and then run it in a redis queue.
then start the queue with this command line
php artisan queue:work --tries=1 --timeout=0
This should fix your problem