Reputation: 1004
A ruby application is showing multiple processes in the server, though it's the same application. It's a windows server.
How can I remove all but one process for this application without manually closing them from the windows task manager.
Pleas help.
Upvotes: 0
Views: 289
Reputation: 42207
It is reported that thin opens multiple threads per connection over time and i suppose a thread will be a process.
Try if
thin restart -C /etc/thin/app.yml
helps.
See http://jordanhollinger.com/2011/04/22/how-to-use-thin-effectivly
Limitting your maximum connections, timeout to the minimum will also help.
Upvotes: 0
Reputation: 78513
Depending on how you're running your app (Passenger? Thin? Mongrel? mod_ruby?), this could actually be normal. As in, the app keeps a pool of processes running until they time out, each awaiting new requests, much like a dynamic php/fastcgi pool would do.
Along the same lines, and per Peter's comment, might it be using threads? If so, it could be equally normal, as in it launches some background jobs before returning and the processes remain around until those jobs are completed.
Upvotes: 1