Skip to content

server : stop gracefully on SIGTERM #6348

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

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

EZForever
Copy link
Contributor

As of b2548 the server does not explicitly handle SIGTERM, thus the default behavior of terminating the process applies. This will not cause any problem normally, but since terminated processes have a abnormal (!= 0) exit code, and SIGTERM is the default stop signal for kill and docker stop/podman stop, not explicitly handling SIGTERM may mess with service health checks. For example, when running the server Docker image as a systemd service (via podman-generate-systemd), errors will always occur when stopping the service.

This PR reuses the handler for SIGINT, enabling the server to stop gracefully on SIGTERM.

@phymbert phymbert merged commit 6902cb7 into ggml-org:master Mar 28, 2024
hodlen pushed a commit to hodlen/llama.cpp that referenced this pull request Apr 1, 2024
hodlen pushed a commit to hodlen/llama.cpp that referenced this pull request Apr 3, 2024
tybalex pushed a commit to rubra-ai/tools.cpp that referenced this pull request Apr 17, 2024
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 this pull request may close these issues.

2 participants