I’m experiencing a strange issue with my Laravel API in production. When sending 230 consecutive requests, only the first 10 requests are processed, then nothing gets logged or inserted into the database. After a while, another set of 10 is processed (specifically the second-to-last 10), and so on. But the majority of requests never even seem to reach my controller.
Here are the key details:
There are no errors or warnings in the Laravel error log related to my API or the import process. The missing requests do not appear in the log at all.
I have set the rate limit in my Laravel application (in App\Providers and in the API routes) to 1000 connections per minute.
This should be far above the volume we’re sending (230 total).
Database Logging in the Constructor
Before reaching the controller’s main logic, I have a constructor in a parent class that logs the request payload to the database.
For most of the requests, there is no corresponding record in the
database, which means these requests never made it that far.
When I manually send the requests one by one to the production
endpoint, I do not receive any error response. Locally, the entire
batch (all 230 requests) is processed without any issues.
The hosting provider analyzed the situation and claims that the issue lies in my Laravel application rather than on their side.
To summary: First 10 requests → processed successfully. Then a long pause with no logs or database entries. Eventually another 10 requests go through, but many are skipped entirely. No error is ever thrown in Laravel logs or returned in the response. Double-checked the rate limiter settings are correct. Examined hosting logs and any potential server-level security modules (e.g., mod_security), but the provider insists it’s an application issue.