我在Laravel上php artisan queue:listen用来运行排队的工作.其中一个工作相当复杂,需要很长时间,因此我收到以下错误:
[Symfony\Component\Process\Exception\ProcessTimedOutException]
The process ""/usr/local/Cellar/php55/5.5.14/bin/php" artisan queue:work
--queue="QUEUE_URL" --delay=0 --memory=128 --sleep=3 --tries=0"
exceeded the timeout of 60 seconds.
Run Code Online (Sandbox Code Playgroud)
我知道我可以运行queue:listen一个任意高的超时值,但是这不是理想的,因为我不希望它的活动时间,一些过程实际上 unreseponsive.我尝试set_time_limit(60)在作业调用的函数内定期调用,但这并没有解决我的问题.
我找到了一个在线提及的线程Symfony\Component\Process\Process->setTimeout(null),但我不知道如何访问该进程对象,或者如果这甚至可以解决问题.
任何帮助将非常感激.