octane icon indicating copy to clipboard operation
octane copied to clipboard

Timeout responds with status code 500, instead of 408 (FrankenPHP)

Open korridor opened this issue 1 year ago • 0 comments

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

  1. Install Laravel Ocatne with FrankenPHP
  2. Set the max_execution_time in octane.php to something other than 0. (f.e. 5)
  3. Take any route and add a sleep(6) that takes longer than the max_execution_time
  4. Access the route and wait until a timeout occurs
  5. The response HTTP status code should now be 408, but it is 500

korridor avatar Sep 16 '24 08:09 korridor