相关疑难解决方法(0)

为什么我的Laravel Queue Jobs在60秒后失败?

情况

我正在使用Laravel Queues来处理大量的媒体文件,预计单个作业需要几分钟(最多只需要一个小时).

我正在使用Supervisor来运行我的队列,我一次运行20个进程.我的超级用户配置文件如下所示:

[program:duplitron-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/duplitron/artisan queue:listen database --timeout=0 --memory=500 --tries=1
autostart=true
autorestart=true
user=duplitron
numprocs=20
redirect_stderr=true
stdout_logfile=/var/www/duplitron/storage/logs/duplitron-worker.log
Run Code Online (Sandbox Code Playgroud)

有些奇怪的事我不知道如何解释或纠正:

  1. 运行60到65秒后,我的工作总是一直失败.
  2. 被标记为失败后,即使被标记为失败,作业也会继续运行.最终他们最终成功解决了问题.
  3. 当我单独运行失败的任务以找到问题的原因时,它就成功了.

我坚信这是一个超时问题; 但是,我的印象是--timeout=0会导致无限制的超时.

问题

如何防止此临时"失败"作业状态?是否有其他可能调用队列超时但我不知道的地方?

php queue laravel

10
推荐指数
3
解决办法
3867
查看次数

Supervisord"退出状态1未预期"运行php脚本

我有问题尝试配置supervisor来运行php脚本.在调试模式下运行supervisor给了我:

2015-03-09 08:53:06,342 INFO supervisord started with pid 2030
2015-03-09 08:53:06,358 INFO spawned: 'worker1' with pid 2031
2015-03-09 08:53:06,423 INFO exited: worker1 (exit status 1; not expected)
2015-03-09 08:53:06,424 INFO received SIGCLD indicating a child quit
2015-03-09 08:53:07,440 INFO spawned: 'worker1' with pid 2032
2015-03-09 08:53:07,587 INFO exited: worker1 (exit status 1; not expected)
2015-03-09 08:53:07,589 INFO received SIGCLD indicating a child quit
2015-03-09 08:53:09,604 INFO spawned: 'worker1' with pid 2033
2015-03-09 08:53:09,756 INFO exited: worker1 (exit status 1; not …
Run Code Online (Sandbox Code Playgroud)

php supervisord

8
推荐指数
1
解决办法
2万
查看次数

标签 统计

php ×2

laravel ×1

queue ×1

supervisord ×1