doubi1910 2016-05-17 11:02
浏览 236
已采纳

Beanstalkd + supervisor + laravel:每小时处理超过10000个作业的队列处理

I have a project in Larave 5.2 and I am using:

  • Beanstalk
  • Supervisor
  • Laravel 5.2
  • Digital Ocean Hosting with 4GB RAM

The project is mainly based on webhooks. Other website calls our webhook and i add those webhooks in a queue. Roughly, 10000 jobs an hours are being added to the queue.

I have 50 num_process set in supervisor configs.

Can you please suggest me that how can i process the jobs in queue really fast. so that I don't have to wait for hours to get my job processed.

Here is a screenshot of current status in the queue

enter image description here

Any help is highly appreciated.

Thank you

Supervisor Config:

[program:laravel_queue]
command=php /var/www/html/nivesh/artisan --env=production --timeout=3600 queue:listen --queue=important,urgent,high,default
autostart=true
autorestart=true
process_name=%(program_name)s_%(process_num)s
numprocs=55
stderr_logfile=/var/log/laraqueue.err.log
stdout_logfile=/var/log/laraqueue.out.log
priority=999
numprocs_start=55
startsecs=0
redirect_stderr=true
  • 写回答

3条回答 默认 最新

  • drasv0904 2016-05-19 19:14
    关注

    Check if you don't have remote calls to external URLs.

    Also add hints in various places to see which operation takes long.

    Try to break into multiple smaller events all the queue, don't be 1 long tasks, make a chain of events.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog