doubu1853 2018-04-07 15:50
浏览 98
已采纳

AWS SQS上的Laravel Queue工作人员 - 很多请求?

I have two Amazon SQS queues that are monitored by two workers. I use it to send e-mails, send some worker requests. The typical back-end stuff. Must be around a few 100 jobs this month.

However, I am getting email from Amazon that I am already at at 887,457 Requests of the free tier 1,000,000 Requests of Amazon Simple Queue Service.

I am wondering how I am getting at this number? Do the workers poll the queue which is considered a request? If so, can we increase this interval?

  • 写回答

3条回答 默认 最新

  • douwen7331 2018-04-07 16:20
    关注

    There is a --sleep option for queue workers:

    php artisan queue:work --help
    

    The default is 3 seconds, so it seems like a request is being made from each of your workers every 3 seconds. With 2 workers, that's 57,600 requests per day. If it's been about 2 weeks since you started this, that would be ~800k requests.

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

报告相同问题?