Getting "no queued message with id" error with missing Webhook events
Describe the bug
Messages sent do not always produce a webhook. In worker.log I see numerous instances of
No queued message with ID 2945901 was available for processing.
The number of messages sent vs. number of webhooks attempted is off by about 60% (30k sent vs. 10k webhooks)
To Reproduce
- Send email with webhooks configured
Expected behaviour
All messages with a sent status should trigger a webhook
Screenshots
MariaDB [postal-server-6]> select distinct event, count(event) from webhook_requests where timestamp>1639579836 group by event;
+-----------------------+--------------+
| event | count(event) |
+-----------------------+--------------+
| MessageBounced | 580 |
| MessageDelayed | 613 |
| MessageDeliveryFailed | 260 |
| MessageSent | 15444 |
+-----------------------+--------------+
4 rows in set (0.83 sec)
MariaDB [postal-server-6]> select distinct status, count(status) from messages where timestamp>1639579836 group by status;
+-----------+---------------+
| status | count(status) |
+-----------+---------------+
| Bounced | 910 |
| HardFail | 324 |
| Held | 132 |
| Pending | 473 |
| Processed | 1026 |
| Sent | 19762 |
| SoftFail | 52 |
+-----------+---------------+
7 rows in set (2.33 sec)
Environment details
- OS: Ubuntu Server 18.04
- Database Version: MariaDB 10.1
- Postal Version: 1.0.0-2595481b26-stable
Additional information/context
Server is running in AWS on an m5.xlarge. Avg. daily volume is about 30k messages but load seems to be pretty high on the system while going through the queue (load avg. around 4 with mysql taking most of the cpu). Postal is configured with 2 workers with 4 threads.
We have another postal install on the same hardware running version 1.0.0-dev that does not have this problem and generally has lower system load despite sending 3x more volume.
Can you add a screenshot of the error message? Also have a look at the current retention settings, these are the defaults I think

Please can you upgrade to the latest version of Postal and confirm whether this issue still exists? If so, please open a new issue for triage. Be sure to include any relevant log data as well as details about your environment as prompted by the new issue template.