doubi1910 2016-05-17 03: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 11: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条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部