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
Can't stop Thin #215
Comments
Could you provide the command line invocation which causes this? |
I'm using it here: https://github.com/nyarly/rhet-butler Specifically: https://github.com/nyarly/rhet-butler/blob/master/lib/rhet-butler/web/main-app.rb#L140 |
From a quick glance at the gist it seems like you are instantiating the This issue is a dup of #177 In your case (from the gist you provided) seems like you want to run a |
Seeing as how #177 is pretty long, I'll post the short version here: When run on its own, |
Seems like some first-class docs of this would be worthwhile. I'm running Thin alongside SockJS, which itself needs to use the reactor (although it gets mounted under Thin, so maybe the one could hang off of the other...) SockJS is also why a) we only use Thin and b) it's as a Rack lookup - I'd like in the future to make it more flexible, since I've had reports that Thin has given some people problems. I'll look into an approach that handles the signal myself - is there a way to get Thin to not trap INT? (Or not get Thin to...) ? |
I apologize but Im not familiar with SocksJS. From your code it seems like it is part/core of the rack app that is passed to thin. In this case (I presume) sockjs is a rack compatible app (and need not know about the EM reactor). There are two options here:
|
Agreed. Currently most (all?) of the documentation covers running(/administering) Thin as a standalone server. Very little documentation exists for embedding thin (server) into existing applications. Most folks are forced to read the src (which is not a bad thing, really). Maybe @macournoyer has thoughts on a new section for this? |
Sorry for the late reply. Yes I need to update the doc on the website. But it should all be documented in the comments here: https://github.com/macournoyer/thin/blob/master/lib/thin/server.rb. If something is missing let me know or submit a PR. |
Listening on 0.0.0.0:8081, CTRL+C to stop
^CStopping ...
^CStopping ...
^C^CStopping ...
Stopping ...
^C^C^C^C^CStopping ...
Stopping ...
Stopping ...
Stopping ...
Stopping ...
Have to ^Z and kill -9 %1. Which is suboptimal.
The text was updated successfully, but these errors were encountered: