-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Gracefully restart running application #188
Comments
Yes, but that will terminate all current requests handled by that process... try it out and let me know how you get on? |
I make some experimets... Test server through But killing through signal HUP whole server works as expected but some requests are broken. Example (2 forks):
# falcon.rb
load :rack, :supervisor
rack 'prober' do
scheme 'http'
protocol { Async::HTTP::Protocol::HTTP1 }
count 2
endpoint do
Async::HTTP::Endpoint.for(scheme, '0.0.0.0', port: 3000, protocol: protocol)
end
end
supervisor
|
Okay let me take a look. |
Sorry, I did not follow up on this, I will take a look today. |
I won't get a chance to look at this but I've put it on my planning board. |
No worries, it's a nice-to-have, but I appreciate your attention in any case! |
Sometimes when I go back I see this in # Restart the process group that the supervisor belongs to.
def do_restart(message)
# Tell the parent of this process group to spin up a new process group/container.
# Wait for that to start accepting new connections.
# Stop accepting connections.
# Wait for existing connnections to drain.
# Terminate this process group.
signal = message[:signal] || :INT
Process.kill(signal, Process.ppid)
end ...but there is no such feature in |
Hi. I investigate possibility to gracefully restart currently running rails application from inside running instance. Main aim is to restart application after serving certain number of requests (ex. After 4000 requests) or after hitting memory limit.
In Passenger or Puma this is possible from middleware through
passenger-config dettach-process $pid
or something like this.I see some methods is async::containers like reload or other but I can't understand how to use them from inside middleware. Is it sufficient to "kill self by INT signal" ?
The text was updated successfully, but these errors were encountered: