https://bz.apache.org/bugzilla/show_bug.cgi?id=63306
Bug ID: 63306 Summary: Memory leak during websocket connection close Product: Tomcat 7 Version: 7.0.82 Hardware: Other OS: Linux Status: NEW Severity: critical Priority: P2 Component: WebSocket Assignee: dev@tomcat.apache.org Reporter: 05.shail...@gmail.com Target Milestone: --- Created attachment 36506 --> https://bz.apache.org/bugzilla/attachment.cgi?id=36506&action=edit Heap dump details We use tomcat as web application server and use websockets to send updates to the client. Websocket clients are written in the .net and connect to application in turn tomcat websockets. Websocket clients sometimes on wireless network. We have seen that there are few thousands (20-40k) connections and disconnections by around 1000 users (websocket client sessions). We observed that application memory in on increasing trend day by day and after 5 days we took heap dump and found that there is memory leak in tomcat. Please find attached screenshots of heapdump opened in Eclipse Memory Analyzer. Heapdumps are quite huge and hence I can not upload. Also in the catalina.out I have seen following log indicating that the servelt output stream could not be closed properly. org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer doClose INFO: Failed to close the ServletOutputStream connection cleanly However above log messages are comparatively far less than the SecureNioChannel and NIOProcessor instance lingering in the Map.Entry. For the SecureSocketChannel.open flag is set to false and underlying socket is also closed as highlighted in the attachments, however Map entries were not removed which has caused memory leak. With this memory leak, we can not take risk to run tomcat continued for days and hence need to restart tomcat after few days. We can upgrade tomcat to 8.5 but need to know if this issue is fixed in tomcat 8.5 or is it altogether new issue. Could you please take look at this issue on priority and help us? Regards, Shailesh -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org