I am using Amazon Beanstalk to host my Laravel Application. I created a special configuration so that my queue:listen will auto re-start on deployment with supervisor.
[unix_http_server]
file=/tmp/supervisor.sock
chmod=0777
[supervisord]
logfile=/var/app/support/logs/supervisord.log
logfile_maxbytes=25MB
logfile_backups=2
loglevel=warn
pidfile=/var/run/supervisord/supervisord.pid
nodaemon=false
nocleanup=true
user=webapp
[program:laravel_queue]
command=php artisan queue:listen --queue=email,activity,purging,misca --memory=256 --env=production
directory=/var/app/current
stdout_logfile=/var/app/support/logs/laravel-queue.log
logfile_maxbytes=25MB
logfile_backups=2
redirect_stderr=true
autostart=true
autorestart=true
startretries=86400
This works great and my problem is after a day or too my server memory always reaches 95%!
I inspected the memory and noticed a bunch of http processes that were started by queue:listen but for some reason never killed (note all jobs succeeded, no failure).
webapp 22923 0.0 0.4 673948 19032 ? S 18:10 0:00 /usr/sbin/httpd -D FOREGROUND
webapp 22926 0.0 0.8 674588 35512 ? S 18:10 0:00 /usr/sbin/httpd -D FOREGROUND
webapp 22929 0.0 0.4 673948 19032 ? S 18:11 0:00 /usr/sbin/httpd -D FOREGROUND
webapp 22931 0.0 0.9 674932 37576 ? S 18:11 0:00 /usr/sbin/httpd -D FOREGROUND
webapp 22932 0.0 0.4 673948 19032 ? S 18:11 0:00 /usr/sbin/httpd -D FOREGROUND
webapp 22934 0.0 0.8 674600 35536 ? S 18:11 0:00 /usr/sbin/httpd -D FOREGROUND
webapp 22935 0.0 0.8 674588 35512 ? S 18:11 0:00 /usr/sbin/httpd -D FOREGROUND
Why are these http processes which I assume are queue:workers not terminating?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire