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

when ClassNotFoundException is thrown , a memory leak will happen after many times of get() operation. #84

Open
VicoWu opened this issue Nov 11, 2015 · 0 comments

Comments

@VicoWu
Copy link

VicoWu commented Nov 11, 2015

I am using memcached to store object like com.abc.Data in my online system.But for some reason , I have to move this class to another package like com.def.Data.So , I do this and update the code in my test system.Both the test and the online system share the same memcached.
of cource , this will cause exceptions throws , because if the online system put the com.abc.Data into memcached by key "memcached_data", when the test system get it , it cannot find the class com.abc.Data because this class has been moved to com.def.Data.
But after a long period of time , I find the system throws exceptions:java.lang.OutOfMemoryError: Direct buffer memory. I debug the code and find that this is because when an ClassNotFoundException happened, the connection was freed but the connection counter does not change.this will make the system think that the connection pool is full and thus create a new connection always instead of reuse the connection..When connection is too much,a OutOfMemoryError happened.

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

1 participant