lundi 29 février 2016

artisan queue is creating hundreds of jobs

I have a command which process some data and then creates a job to be process in the jobs table of laravel, when I run php artisan queue:listen --queue=job-name its starts creating a lot of thread.I use supervisor to manage my jobs and the config of supervisor is as follows :

[program:exportlistener]
command=php /var/www/prodadm/sipi-www/current/artisan queue:listen --queue exportdata --tries 3 --timeout 3600
user=prodadm
autostart=true
autorestart=true

[program:htmllistener]    
command=php /var/www/prodadm/sipi-www/current/artisan queue:listen --queue=htmldownload --tries 1 --memory=256 --timeout 240
user=prodadm
autostart=true
autorestart=true

The following is the result of ps aux | grep php5 these processes keep increasing as the time passes which is eating all my RAM

Please see

root 4761 0.0 0.4 277448 16980 ? Ss Feb26 0:26 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)

prodadm 8948 0.0 0.0 4440 656 ? S 12:39 0:00 sh -c "/usr/bin/php5" artisan queue:work --queue="htmldownload" --delay=0 --memory=256 --sleep=3 --tries=1 --env=production

prodadm 8950 0.3 0.9 270568 36540 ? S 12:39 0:00 /usr/bin/php5 artisan queue:work --queue=htmldownload --delay=0 --memory=256 --sleep=3 --tries=1 --env=production prodadm 8953 0.0 0.0 4440 656 ? S 12:39 0:00 sh -c "/usr/bin/php5" artisan queue:work --queue="htmldownload" --delay=0 --memory=256 --sleep=3 --tries=1 --env=production prodadm 8954 0.3 0.9 270568 36540 ? S 12:39 0:00 /usr/bin/php5 artisan queue:work --queue=htmldownload --delay=0 --memory=256 --sleep=3 --tries=1 --env=production prodadm 8955 0.0 0.0 4440 656 ? S 12:39 0:00 sh -c "/usr/bin/php5" artisan queue:work --queue="htmldownload" --delay=0 --memory=256 --sleep=3 --tries=1 --env=production prodadm 8956 0.2 0.9 270568 36548 ? S 12:39 0:00 /usr/bin/php5 artisan queue:work --queue=htmldownload --delay=0 --memory=256 --sleep=3 --tries=1 --env=production prodadm 8957 0.0 0.0 4440 656 ? S 12:39 0:00 sh -c "/usr/bin/php5" artisan queue:work --queue="htmldownload" --delay=0 --memory=256 --sleep=3 --tries=1 --env=production prodadm 8958 0.3 0.9 270568 36544 ? S 12:39 0:00 /usr/bin/php5 artisan queue:work --queue=htmldownload --delay=0 --memory=256 --sleep=3 --tries=1 --env=production prodadm 9050 0.0 0.0 4440 656 ? S 12:41 0:00 sh -c "/usr/bin/php5" artisan queue:work --queue="exportdata" --delay=0 --memory=128 --sleep=3 --tries=3 --env=production prodadm 9051 8.0 0.8 189360 31108 ? S 12:41 0:00 /usr/bin/php5 artisan queue:work --queue=exportdata --delay=0 --memory=128 --sleep=3 --tries=3 --env=production root 9053 0.0 0.0 10464 932 pts/2 S+ 12:41 0:00 grep --color=auto php5



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1oV1hJG
via IFTTT

Aucun commentaire:

Enregistrer un commentaire