laravel - Periodic spikes in CPU usage, possibly queue related? -


i added beanstalk queue application (running through supervisor).

i noticed cpu usage periodically spiking:

http://i.imgur.com/0fg1fql.png

as far know, there's nothing in queue. i've restarted beanstalkd multiple times. noticed when stop supervisor processes, cpu usage goes zero.

is normal behavior queues though there's nothing in queue? there way make spikes less severe?

and if helps, here's supervisor worker configuration:

[program:laravel-worker] process_name=%(program_name)s_%(process_num)02d command=php /var/www/laravel/artisan queue:work beanstalkd --sleep=3 --tries=3 --daemon autostart=true autorestart=true numprocs=8 redirect_stderr=true 

thanks.

the short answer takes effort load relevant php files, , check queue new items, regardless of work in queue, done.

enabling opcache used command-line scripts, faster versions of php, v7, help, longer sleeps between runs pause if there no jobs in queue.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -