[
https://issues.apache.org/jira/browse/ARTEMIS-2991?focusedWorklogId=512562&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-512562
]
ASF GitHub Bot logged work on ARTEMIS-2991:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 16/Nov/20 20:03
Start Date: 16/Nov/20 20:03
Worklog Time Spent: 10m
Work Description: jbertram commented on pull request #3339:
URL: https://github.com/apache/activemq-artemis/pull/3339#issuecomment-728293307
It's common to add getters or other helper methods when writing tests.
You'll need to add a method to get the `ProtocolHandler` from the
`NettyAcceptor` as well as a method to get the `HttpKeepAliveRunnable` from the
`ProtocolHandler` and finally a method to get the `List<HttpAcceptorHandler>`
from the `HttpKeepAliveRunnable`.
Once you create/configure/start the embedded server for your test you can
use the
`org.apache.activemq.artemis.core.server.ActiveMQServer#getRemotingService`
method and then
`org.apache.activemq.artemis.core.remoting.server.RemotingService#getAcceptor`.
Once you have the right `Acceptor` instance you can use the methods you added
to get the list of handlers. Your test should create a bunch of websocket
connections and make sure the size of the handler list doesn't keep growing.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 512562)
Time Spent: 40m (was: 0.5h)
> Leak of HttpAcceptorHandler instances when using websocket connections
> ----------------------------------------------------------------------
>
> Key: ARTEMIS-2991
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2991
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Affects Versions: 2.9.0, 2.10.0, 2.10.1, 2.11.0, 2.12.0, 2.13.0, 2.14.0,
> 2.15.0, 2.16.0
> Reporter: Luis Miguel De Bello
> Priority: Major
> Fix For: 2.17.0
>
> Attachments: HeapDump analysis.png
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> We are running Artemis 2.9.0 and we noticed the memory grows continuously
> after getting a heap we discovered there are a leak of multiple instances of
> type org.apache.activemq.artemis.core.remoting.impl.netty.HttpAcceptorHandler
> which are keep in a list inside
> org.apache.activemq.artemis.core.remoting.impl.netty.HttpKeepAliveRunnable.
>
> Those instances are removed in the channelInactive method but this method is
> not called because when doing the upgrade to websocket the handler is removed.
>
> Proposals:
> 1) In the upgrade clean up the reference for the HttpAcceptorHandler before
> removing the handler.
> 2) If option 1 does not work because that threads also send the keep alive
> for websocket, I could use the channelInactive from websocket handler to
> later unregister the handler
--
This message was sent by Atlassian Jira
(v8.3.4#803005)