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

Server Memory Leak connectionList Service Sockets Not being Removed #44

Open
swordmaster2k opened this issue Nov 6, 2015 · 0 comments

Comments

@swordmaster2k
Copy link

I've been running some pretty heavy continuous soak tests using this sampler and I've discovered a memory leak related to the connectionList declared in the ServiceSocket class. Basically what I am doing is looping my threads infinitely and each WebSocketSampler has a unique connection ID for debugging purposes.

Overtime the connectionList HashMap is gradually filling up resulting in the JVMs heap overflowing with redundant references. I've implemented a fix locally that just removes the connection from the collection when it is closed:

@OnWebSocketClose
    public void onClose(int statusCode, String reason) {
       <output omitted>
        close(StatusCode.NORMAL, "JMeter closed session.");
        parent.getConnectionList().remove(connectionID); // Remove from collection to prevent leakage.
    }
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