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

Using exit; in Laravel also stops octane and results in HTTP error 500 #654

Closed
mariandomanik opened this issue Mar 2, 2023 · 1 comment

Comments

@mariandomanik
Copy link

  • Octane Version: 1.4.2
  • Laravel Version: 9.52.4
  • PHP Version: 8.1.13
  • Server & Version: RoadRunner 2.12.3
  • Database Driver & Version: not relevant

Description:

When calling

response()->json([], 200)->send(); exit;

Not only there is no response coming from Laravel response() but the octane worker is also stopped, this is cli output:

`14:53[1015] php artisan octane:start

INFO Server running…

Local: http://127.0.0.1:8000
Press Ctrl+C to stop the server
INFO []
network error
500 GET / ............................. 165.14 ms
worker stopped`

When using exit;, there is always server error with 500. Is this desired? Even calling an empty route with exit; has the same result.

Steps To Reproduce:

Call exit; anywhere in the code and it results to HTTP response 500 and stops the octane worker.

@taylorotwell
Copy link
Member

Don't use exit.

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

2 participants