I'm new to Amazon SQS, but some of the figures are alarming so far.
I've configured Laravel to queue email messages which are being sent by my site using Amazon SQS. The service itself seems to work fine. All the messages appear in the SQS queue of my AWS account, but the problem is that the queue just seems to be getting bigger and bigger (or at least never going down).
I can't find any decent tutorials or guides that explain how to read the SQS screen written in plain English, so everything MAY be fine. That said, I'd like to make sure.
Consider what SQS is currently saying:
Messages available: 300
Messages in Flight: 4
Messages delayed: 0
When I tested it when it first went live, the emails were being sent immediately. The "Messages available" was empty, and the emails arrived in my inbox without issue.
Today the figure is considerably higher, as you can see, and it never seems to fully reach 0. In addition to this the emails are taking several hours to arrive.
Is this normal?
I've SSH'd into my Elastic Beanstalk instance and taken a look around. I've manually added five background processes running php artisan queue:work, each consumes ~5% of the CPU. Hmm.
If I manually run the same command (without nohup) I see a constantly updating list:
[2018-04-04 20:09:59] Processing: App\Notifications\CompetitionAll
[2018-04-04 20:09:59] Processing: App\Notifications\CompetitionVIP
[2018-04-04 20:10:00] Processing: App\Notifications\CompetitionVIP
[2018-04-04 20:10:00] Processing: App\Notifications\CompetitionVIP
[2018-04-04 20:10:00] Processing: App\Notifications\CompetitionAll
[2018-04-04 20:10:00] Processing: App\Notifications\CompetitionAll
[2018-04-04 20:10:00] Processing: App\Notifications\CompetitionAll
[2018-04-04 20:10:02] Processing: App\Notifications\CompetitionAll
[2018-04-04 20:10:02] Processing: App\Notifications\CompetitionAll
[2018-04-04 20:10:02] Processing: App\Notifications\CompetitionAll
[2018-04-04 20:10:02] Processing: App\Notifications\CompetitionAll
[2018-04-04 20:10:02] Processing: App\Notifications\CompetitionAll
[2018-04-04 20:10:02] Processing: App\Notifications\CompetitionAll
[2018-04-04 20:10:03] Processing: App\Notifications\CompetitionAll
[2018-04-04 20:10:03] Processing: App\Notifications\CompetitionAll
[2018-04-04 20:10:03] Processing: App\Notifications\CompetitionAll
[2018-04-04 20:10:03] Processing: App\Notifications\CompetitionAll
[2018-04-04 20:10:03] Processing: App\Notifications\CompetitionAll
Only every so often does one change to Processed, most of the time it's an endless list of yellow Processing, changing every second.
When I view the messages in SQS, I see very high "Receive counts". Some as high as 427!
Again, is this normal? It seems almost impossible to find an explanation of these numbers.
Any help understand what's going on would be greatly appreciated!
via Chebli Mohamed

Aucun commentaire:
Enregistrer un commentaire