beanstalkd

Laravel Artisan Queues - high cpu usage

元气小坏坏 提交于 2019-11-30 04:56:14
I have set up queues in Laravel for my processing scripts. I am using beanstalkd and supervisord. There are 6 different tubes for different types of processing. The issue is that for each tube, artisan is constantly spawning workers every second. The worker code seems to sleep for 1 second and then the worker thread uses 7-15% cpu, multiply this by 6 tubes... and I would like to have multiple workers per tube.. my cpu is being eaten up. I tried changing the 1 second sleep to 10 seconds. This helps but there is still a huge cpu spike every 10 seconds when the workers wake back up. I am not even

Laravel Artisan Queues - high cpu usage

女生的网名这么多〃 提交于 2019-11-29 02:24:35
问题 I have set up queues in Laravel for my processing scripts. I am using beanstalkd and supervisord. There are 6 different tubes for different types of processing. The issue is that for each tube, artisan is constantly spawning workers every second. The worker code seems to sleep for 1 second and then the worker thread uses 7-15% cpu, multiply this by 6 tubes... and I would like to have multiple workers per tube.. my cpu is being eaten up. I tried changing the 1 second sleep to 10 seconds. This

How can I get a list of all jobs in a beanstalk tube?

ε祈祈猫儿з 提交于 2019-11-28 22:58:43
I have beanstalk installed on my server, and run the following: $ telnet localhost 11300 use my_tube USING my_tube peek-ready FOUND 11065 41 {"ts":1295537419,"data":{"nid":"212156"}} Now my question is: how can I get a list of all jobs in the queue; something like peek-all ? There are some forks of the main code that provide this sort of information ( retrieving ready, reserved, and buried jobs in a tube ), but its not in the main trunk version. This is because of the problems that it can bring - such as on a huge implementation it would have to return a potentially vast amount of data and

delayed_jobs vs resque vs beanstalkd?

白昼怎懂夜的黑 提交于 2019-11-28 15:10:45
Here is my needs: Enqueue_in(10.hours, ... ) (DJ syntax is perfect.) Multiply workers, concurrently. (Resque or beanstalkd are good for this, but not DJ) Must handle push and pop of 100 jobs a second. (I will need to run a test to make sure, but I think DJ can't handle this many jobs) Resque and beanstalkd don't do the enqueue_in. There is a plugin (resque_scheduler) that does it, but I'm not sure of how stable it is. Our enviroment is on amazon, and they rolled out the beanstalkd for free for who has amazon instances, that is a plus for us, but I'm still not sure what is the best option here.

pheanstalk and beanstalk functions

本秂侑毒 提交于 2019-11-28 02:18:00
The following code is a snipet taken from an example of pheanstalk being implemented and working properly (obtained from pheanstalk's github page: https://github.com/pda/pheanstalk ): <?php require_once("vendor/autoload.php"); use Pheanstalk\Pheanstalk; $pheanstalk = new Pheanstalk('127.0.0.1'); // ------------ producer (queues jobs): $pheanstalk ->useTube('testtube') ->put("job payload goes here\n"); // ------------ worker (performs jobs): $job = $pheanstalk ->watch('testtube') ->ignore('default') ->reserve(); echo $job->getData(); $pheanstalk->delete($job); // ------------ check server

How can I get a list of all jobs in a beanstalk tube?

馋奶兔 提交于 2019-11-27 14:41:33
问题 I have beanstalk installed on my server, and run the following: $ telnet localhost 11300 use my_tube USING my_tube peek-ready FOUND 11065 41 {"ts":1295537419,"data":{"nid":"212156"}} Now my question is: how can I get a list of all jobs in the queue; something like peek-all ? 回答1: There are some forks of the main code that provide this sort of information (retrieving ready, reserved, and buried jobs in a tube), but its not in the main trunk version. This is because of the problems that it can

delayed_jobs vs resque vs beanstalkd?

元气小坏坏 提交于 2019-11-27 09:04:10
问题 Here is my needs: Enqueue_in(10.hours, ... ) (DJ syntax is perfect.) Multiply workers, concurrently. (Resque or beanstalkd are good for this, but not DJ) Must handle push and pop of 100 jobs a second. (I will need to run a test to make sure, but I think DJ can't handle this many jobs) Resque and beanstalkd don't do the enqueue_in. There is a plugin (resque_scheduler) that does it, but I'm not sure of how stable it is. Our enviroment is on amazon, and they rolled out the beanstalkd for free

pheanstalk and beanstalk functions

送分小仙女□ 提交于 2019-11-27 04:52:41
问题 The following code is a snipet taken from an example of pheanstalk being implemented and working properly (obtained from pheanstalk's github page: https://github.com/pda/pheanstalk): <?php require_once("vendor/autoload.php"); use Pheanstalk\Pheanstalk; $pheanstalk = new Pheanstalk('127.0.0.1'); // ------------ producer (queues jobs): $pheanstalk ->useTube('testtube') ->put("job payload goes here\n"); // ------------ worker (performs jobs): $job = $pheanstalk ->watch('testtube') ->ignore(