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

Make a shutdown timeout configurable for sysv #167

Open
annamel opened this issue May 3, 2019 · 1 comment
Open

Make a shutdown timeout configurable for sysv #167

annamel opened this issue May 3, 2019 · 1 comment

Comments

@annamel
Copy link

annamel commented May 3, 2019

sysv code has a shutdown timeout equal to 10
if is_running; then echo -n "Stopping $name.." kill $(get_pid) for i in $(seq 1 10) do if ! is_running; then break fi echo -n "." sleep 1 done
If the service hasn't completed within 10 seconds, restart fails (stops fails 'cause of is_running is true and 10 1-seconds long intervals have exhausted; start fails since is_running is true; meanwhile the service completes).

The absence of configurable timeouts make it complicated to use kardianos.service for http.Server with graceful shutdown. 'Cause graceful shutdown timeout actually must be below this hardcoded 10 seconds period.

@kardianos
Copy link
Owner

I understand. Feel free to propose a change/PR. This change makes sense.

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