octane
octane copied to clipboard
Timeout responds with status code 500, instead of 408 (FrankenPHP)
Octane Version
2.5.4
Laravel Version
11.22.0
PHP Version
8.3.10
What server type are you using?
FrankenPHP
Server Version
1.2.1
Database Driver & Version
No response
Description
I'm using Laravel Octane with FrankenPHP, and I'm setting the max_execution_time to a specific value. When a request takes longer than that, it returns a status code 500 instead of the correct 408.
This happens in my local Laravel Sail setup, but also in production. The production image has the official FrankenPHP docker image as a base image. Locally, I use the version with the FrankenPHP binary directly.
The project I have the problem with is open-source and can be viewed here: https://github.com/solidtime-io/solidtime Link to the Production Docker image: https://github.com/solidtime-io/solidtime/tree/main/docker/prod
Steps To Reproduce
- Install Laravel Ocatne with FrankenPHP
- Set the
max_execution_timeinoctane.phpto something other than0. (f.e. 5) - Take any route and add a
sleep(6)that takes longer than themax_execution_time - Access the route and wait until a timeout occurs
- The response HTTP status code should now be 408, but it is 500