Skip to content
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

How can I safely close a JRuby instance? #7159

Open
zhu956645239 opened this issue Mar 28, 2022 · 1 comment
Open

How can I safely close a JRuby instance? #7159

zhu956645239 opened this issue Mar 28, 2022 · 1 comment

Comments

@zhu956645239
Copy link

Hello, good developers, after using JRuby, some static member attributes remain in memory, how to clean up all.
Next I use MAT to analyze heap snapshots

image
image

@headius
Copy link
Member

headius commented Mar 31, 2022

It seems like you are shutting things down correctly.

We do have a number of static, "effectively immutable" values sprinkled around JRuby, but I would not expect to see them be a problem from run to run (they would be reused once created).

However I also see globalRuntime retaining 1.4MB that should probably be cleanable (we will keep a global runtime active, but that should only happen if you request it). That might deserve some investigation in case we are creating it when we should not.

Can you help me understand how you are using JRuby in your app, so we might figure out why too much data is being retained?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants