duandao3265 2016-07-01 19:58
浏览 1219
已采纳

queue:listen timeout停止处理队列处理

i'm using laravel 5 queue for render some 3d files with blender.

some models, have problem with rendering and rendering time is really high like 1 min.

i want to have timeout for doing job (60 sec), when i add timeout to queue:listen , if some job executing time be higher that 60 second , my queue stops but i want just ignore that job and continue doing other jobs.

command i ran:

php artisan queue:listen --tries=3 --timeout=60

error :

Symfony\Component\Process\Exception\ProcessTimedOutException]                                                                                                                     
  The process "'/usr/local/php56/bin/php56' 'artisan' queue:work '' --queue='default' --delay=0 --memory=128 --sleep=3 --tries=3 --timeout=120 --env='production'" exceeded the timeout of 60
  seconds.  

what should i do for solving this ?

Edit:

I googled supervisor,and i found that supervisor is used to continue queue when any problem happened such rebooting VPS or other problem happening outside of job works.

I do n't think supervisor must be used for my problem ...

  • 写回答

1条回答 默认 最新

  • dongsaohu6429 2016-07-01 20:01
    关注

    You could use supervisor to restart the process again Laravel docs. You can't really catch a PHP timeout. Set the tries to 1, so it doesn't attempt the large process.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?