-
Notifications
You must be signed in to change notification settings - Fork 221
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
Memory leak on JRuby #101
Comments
Pull request totally welcome. Issue totally makes sense |
any news on this, I would like to wrap it up |
Sorry, I had gotten roped into a separate bug in JRuby that's since been resolved, but I forgot to revisit this. I'll try to get to it this weekend. |
I re-opened the issue on the new project with a pull request: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
JRuby application servers that can do hot redeploys will shut down the old JRuby runtime without exiting the process. In a few places, rack-mini-profiler creates threads that won't shut down until the process dies. Each of these threads will cause a stopped JRuby runtime to sit around in memory much longer than necessary (they appear to be weakrefs and as such, should eventually be GC'd).
Rack::MiniProfiler::FileStore
Rack::MiniProfiler::MemoryStore
are definitely problematic.
Rack::MiniProfiler may be problematic. This one create a thread that can be exited under certain circumstances. I'd have to trace through to see when that happens.
The simple fix is to flag the thread in an at_exit handler. I did this for another project:
https://github.com/wr0ngway/lumber/blob/a35520abace41a87b455b15398be630e7ef5b2da/lib/lumber/level_util.rb#L83
If you're open to a similar solution I can pull together a pull request.
The text was updated successfully, but these errors were encountered: