On shutdown Pingora always sleep for `graceful_shutdown_timeout_seconds`
Opened this issue · 0 comments
Describe the bug
On shutdown Pingora always sleep for graceful_shutdown_timeout_seconds, regardless how quick all the tokio had runtimes finished. Problematic code is here:
pingora/pingora-core/src/server/mod.rs
Lines 575 to 585 in a6dbd1a
Pingora correctly waits for runtime to shutdown, but then for some reason adds thread::sleep for the same amount which doesn't make any sense I think.
Pingora info
Please include the following information about your environment:
Pingora version: Master
Rust version: doesn't matter
Operating system version: doesn't matter
Steps to reproduce
Do a Pingora reload and set graceful_shutdown_timeout_seconds to 10 minutes, even empty without any services old server will die exactly after that amount of time.
Expected results
As it's a timeout, I was expecting Pingora to stop as soon as all runtimes has finished.