Skip to content

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

@VicoWu

Description

@VicoWu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions