douyong1974 2017-03-30 15:05
浏览 47

Laravel 5.4.16 Homestead - 主管突然终止

Since updating my homestead today I've been having problems with supervisor queues (using Redis). The problem I am facing is that my queues terminate themselves after about 60 seconds (with some alternation).

This problem hasn't occured before updating to the most recent homestead version and I just can't figure out why this is happening, there are no logs or errors shown about this and my colleague is having the same problem.

My memory is only using ~1000MB RAM, which is way under my allowed 4GB limit, so that can't be the problem. Running the script using PHP itself works perfectly aswell, it's just supervisor that is giving the problems.

I have tried to change to the database variant of the queue driver and it causes the same situation to happen (plus it's slower than supervisor). Using the sync driver does make it stay alive, but it's 10 times as slow and I want Redis to handle the queues for me.

My supervisor configuration looks like this:

; supervisor config file

[unix_http_server]
file=/var/run/supervisor.sock   ; (the path to the socket file)
chmod=0700                       ; sockef file mode (default 0700)

[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor            ; ('AUTO' child log dir, default $TEMP)

; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL  for a unix socket

; The [include] section can just contain the "files" setting.  This
; setting can list multiple files (separated by whitespace or
; newlines).  It can also contain wildcards.  The filenames are
; interpreted as relative to this file.  Included files *cannot*
; include files themselves.

[include]
files = /etc/supervisor/conf.d/*.conf

My project specific configuration looks like this:

[program:grotesmurf_laravel_queue]
process_name=%(program_name)s_%(process_num)02d
command=php /home/vagrant/Code/grotesmurf/artisan queue:work --sleep=3 --tries=3 --queue=grotesmurf --timeout=0
autostart=true
autorestart=true
user=vagrant
numprocs=3
redirect_stderr=true
stdout_logfile=/home/vagrant/Code/grotesmurf/storage/logs/queue/laravel_queue.out.log
stderr_logfile=/home/vagrant/Code/grotesmurf/storage/logs/queue/laravel_queue.err.log

My php-fpm log is not outputting anything.

My supervisord queue is not outputting anything.

My laravel.log is not outputting anything.

My supervisor version: 3.3.1

My php version is : 7.1.3-3+deb.sury.org~xenial+1

My laravel version is: 5.4.16

If any more information is needed, please let me know.

Does anyone have any suggestions for things to try? Is anyone else experiencing this issue aswell?

Thanks in advance.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
    • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
    • ¥16 mybatis的代理对象无法通过@Autowired装填
    • ¥15 可见光定位matlab仿真
    • ¥15 arduino 四自由度机械臂
    • ¥15 wordpress 产品图片 GIF 没法显示
    • ¥15 求三国群英传pl国战时间的修改方法
    • ¥15 matlab代码代写,需写出详细代码,代价私
    • ¥15 ROS系统搭建请教(跨境电商用途)
    • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。