-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Handle SIGINT
in segcache
#74
Comments
will look into this |
I think we should aim for a solution that will handle more signals than
|
Thank you folks for your quick response on this issue. It would be fantastic if a simple handling of server termination via |
w.r.t log rotation: @brayniac https://github.com/pelikan-io/rustcommon/blob/main/ringlog/src/outputs.rs#L80 it seems like ringlog automatically rotates files, but only if the size has been exceeded. If we wanted to force rotation (assuming we want to eventually emulate Pelikan legacy SIGHUP handling) would we want to modify Ringlog to have a forced rotation (i.e. regardless of whether size is exceeded)? SIGHUP:If we ever wanted to have SIGHUP force log rotation, a la Pelikan-legacy, it seems like we'd probably want to hold off on handling that signal via graceful shutdown SIGUSR1:SIGUSR1 seems like something worth handling similar to Redis once we have a persistence SIGINTWe should use our current graceful shutdown SIGTERMWe should use our current graceful shutdown @thinkingfish since there isn't any persistence right now, then I'm assuming we don't want to do anything with SIGUSR1. Which then it seems like we have a few options currently:
|
ok I have set up my PR https://github.com/pelikan-io/pelikan/pull/79/files/b0296bcf6882bf388175ee6153a138dde96fd4de..fb1513df7a0309651cf57d6d3d00772bad5ec8f8 to use signal-hook instead in the commits I linked and it isn't much more complex than ctrlc. I'm not doing anything specific with SIGHUP at the moment as forced log rotation seems like a reasonable iterative enhancement and it wasn't clear to me if it was necessary with the Ringlog style automatic rotation (or even if it's currently exposed to the user at all as something they can initiate) all it does currently is handle SIGINT/SIGTERM/SIGHUP on *nix style operating systems by prompting shutdown of listeners/workers over the admin channel This solution will not work for Windows but Windows portability is not considered a priority for Pelikan |
Thank you all |
Currently, a containerised
segcache
process does not handleSIGNINT
. This means to stop the container one has to force-kill it.It would be great if the code is changed to gracefully handle
SIGINT
and stops the segcache server. This needsSIGNIT
signal handling at Rust level forServer.Process
.The text was updated successfully, but these errors were encountered: