Laravel's RateLimited job middleware failed 240 of 300 jobs

With 4 workers, Laravel's RateLimited middleware at 20 jobs per second kept a small tenant's 10 jobs at 0.51 seconds instead of 4.27, but under the default tries of 3 it failed 240 of the noisy

Delaying jobs at dispatch with delay(intdiv($i, 20)) finished all 300 jobs in 14.11 seconds with no failures, while retryUntil finished them in 55.72 seconds.

Per-transaction SET LOCAL statement_timeout and lock_timeout, plus an idle_in_transaction_session_timeout on the app role, cut a 32.57-second query to 2.64 seconds and a 7.06-second lock block to

Read the full post

Read the full post