https://bz.apache.org/bugzilla/show_bug.cgi?id=59189
Bug ID: 59189
Summary: PerMessageDeflate leaves native memory allocated
unnecessarily
Product: Tomcat 7
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: WebSocket
Assignee: [email protected]
Reporter: [email protected]
During websocket load tests we noticed that the resident memory usage of the
tomcat process would grow and stay in use even after the sockets were closed
when websocket compression was enabled. The java heap looked fine. It seems to
be caused by PerMessageDeflate creating a Deflater and Inflater which in turn
allocates native memory that isn't freed until the JVM decides to run their
finalizers, which can take a long time before it happens.
I propose calling .end() (which is what finalize() does) on the Deflater and
Inflater when the websocket is closed. I have created a patch that does this
and resident memory usage shrinks after the websockets are closed down with it.
Would you be interested in this?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]