我知道这可能是一个很难的问题,因为它涉及到超级排队的排队,但我希望有人能够尝试和我一起解决破解应用程序的问题。
我目前的情况是,我有一个运行大量导入的应用程序,每个都在自己的主管线程/ proc上,即使队列的超时设置为 0 < / strong>或 3600 ,主管队列一直在3600分之前终止,通常在大约30-40分钟之后。
我已经跟踪了RAM-&amp;导入的CPU使用率,但这可能不是问题,因为我使用max。 2GB / 8GB内存,CPU只使用1个线程,使用率约为20%。
我的主管队列如下:
[program:laravel_queue]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/application/artisan queue:work --sleep=3 --tries=1 --queue=application --timeout=0
autostart=true
autorestart=true
user=administrator
numprocs=4
redirect_stderr=true
stdout_logfile=/var/www/application/storage/logs/queue/laravel_queue.out.log
stderr_logfile=/var/www/application/storage/logs/queue/laravel_queue.err.log
我已使用--timeout=3600
尝试了相同的变体,但队列仍然在大约40分钟后终止。
我在Homestead / Laravel VM中运行相同的设置,并且它在Homestead VM中运行完美。
我是否缺少一些redis配置设置,在40分钟后终止连接?我正在运行一个集群系统,其中有一个单独的 - 远程 - redis-server,应用程序与之通信。
我想提供更多信息,但我不确定我能提供什么更有用的信息,所以如果您有任何想法,我可能愿意提供大部分信息。
提前致谢。
---编辑---
我收到了主管日志的一部分,其中发生了终止:
2017-11-28 12:54:34,151 INFO waiting for application_laravel_queue_02 to stop
2017-11-28 12:54:34,151 INFO waiting for application_laravel_queue_03 to stop
2017-11-28 12:54:34,151 INFO waiting for application_laravel_queue_00 to stop
2017-11-28 12:54:34,151 INFO waiting for application_laravel_queue_01 to stop
2017-11-28 12:54:34,155 INFO stopped: application_laravel_queue_02 (terminated by SIGKILL)
2017-11-28 12:54:34,155 INFO stopped: application_laravel_queue_00 (terminated by SIGKILL)
2017-11-28 12:54:34,156 INFO stopped: application_laravel_queue_01 (terminated by SIGKILL)
2017-11-28 12:54:36,158 INFO waiting for application_laravel_queue_03 to stop
2017-11-28 12:54:38,161 INFO waiting for application_laravel_queue_03 to stop
2017-11-28 12:54:40,164 INFO waiting for application_laravel_queue_03 to stop
2017-11-28 12:54:42,170 INFO waiting for application_laravel_queue_03 to stop
2017-11-28 12:54:44,173 WARN killing 'application_laravel_queue_03' (1004) with SIGKILL
2017-11-28 12:54:44,174 INFO waiting for application_laravel_queue_03 to stop
2017-11-28 12:54:44,182 INFO stopped: application_laravel_queue_03 (terminated by SIGKILL)
2017-11-28 12:54:45,193 INFO spawned: 'application_laravel_queue_02' with pid 4235
2017-11-28 12:54:45,196 INFO spawned: 'application_laravel_queue_00' with pid 4236
2017-11-28 12:54:45,199 INFO spawned: 'application_laravel_queue_01' with pid 4237
2017-11-28 12:54:46,378 INFO success: application_laravel_queue_02 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-11-28 12:54:46,379 INFO success: application_laravel_queue_00 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-11-28 12:54:46,379 INFO success: application_laravel_queue_01 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
它似乎得到终止信号(SIGKILL),但我不知道如何或从何处。在这段时间内清理php-fpm日志。