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

Terminate gracefully on SIGTERM #469

Closed
spawnia opened this issue Jan 26, 2022 · 1 comment
Closed

Terminate gracefully on SIGTERM #469

spawnia opened this issue Jan 26, 2022 · 1 comment

Comments

@spawnia
Copy link
Contributor

spawnia commented Jan 26, 2022

  • Octane Version: 1.2.0
  • Laravel Version: 8.80.0
  • PHP Version: 8.0.9
  • Server & Version: Swoole 4.7.0
  • Database Driver & Version: None

Description:

When terminating a running Octane process with SIGTERM, it exits with the non-zero exit code 137.
This indicates a crash or abrupt failure.

I would expect the process to terminate gracefully with exit code 0.

Steps To Reproduce:

root@59d2aec7e8b2:/var/www# php artisan octane:start 

   INFO  Server running…

  Local: http://127.0.0.1:8000 

  Press Ctrl+C to stop the server

root@59d2aec7e8b2:/var/www# echo $?
137

In a second terminal, while Octane is running:

root@59d2aec7e8b2:/var/www# ps aux | grep octane
root       264  0.1  0.2 119612 59224 pts/1    S+   15:34   0:00 php artisan octane:start
root       307  0.0  0.0   3084   820 pts/2    S+   15:36   0:00 grep octane
root@59d2aec7e8b2:/var/www# kill -TERM 264
@driesvints
Copy link
Member

Although not ideal, I don't see this as disruptive or blocking. Feel free to send in a PR if you have a fix 👍

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

Successfully merging a pull request may close this issue.

3 participants