Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
korridor opened this issue Sep 16, 2024 · 0 comments
Open

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

korridor opened this issue Sep 16, 2024 · 0 comments

Comments

@korridor
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant