Hi all,
We have a POST route in routes/api.php for creating a temporary landing page:
Route::post('/create-landing-page', [TempLandingPageController::class, 'function_with_anonyme_name']);
The issue is that when the script runs longer than ~30 seconds, it just stops, even though we’ve tried increasing the execution time at runtime:
$init_set_string = ini_set('max_execution_time', 700);
We’ve checked all the usual places (php.ini, .user.ini, .htaccess, etc.), and everything reports 120 seconds, but the request still dies at ~30 seconds.
Additionally, when we try to hit the route via GET (by mistake), we get:
The GET method is not supported for route api/function_with_anonyme_name. Supported methods: POST.
Details we know:
PHP CLI is fine (max_execution_time = 0), so scripts run fine in Tinker or CLI.
The server is Apache + PHP-FPM under cPanel, multiple PHP versions installed.
The POST route is executed through the web, so FPM / Apache timeouts may be involved.
All our .ini changes (php.ini, user.ini, .htaccess) don’t seem to affect this 30s limit.
Memory and file size limits are set high enough.
We suspect some server-level timeout (Apache / FPM / proxy) is cutting the request early, but we’re not sure exactly where or how to override it safely for this API route.
Any ideas on what could cause a POST route to stop at 30s despite max_execution_time being increased, and how to fix it for long-running processes?
Thanks in advance.