Closed glassfishrobot closed 7 years ago
Reported by MarcBecker
@rlubke said: Thank you for the report.
Could you please test with this snapshot and verify resolution in your environment?
Thanks!
[1] https://www.dropbox.com/s/162hfsf56exs6ys/grizzly-framework-2.3.28-SNAPSHOT.jar?dl=0
marcbecker said: Thanks for looking into this so quickly. The queue is correctly cleaned up in my scenario, when using the 2.3.28 snapshot. Any hint on when we could expect a release of that fix? Our workaround is currently to disable the transaction timeout, which is however only a temporary solution for us to solve the memory leak.
@rlubke said: I'll try to get a release out at the end of this week or early next.
This issue was imported from java.net JIRA GRIZZLY-1867
Marked as fixed on Thursday, September 22nd 2016, 7:56:19 am
Grizzly's AbstractThreadPool uses a DelayedExecutor to manage transaction timeouts of worker threads. We are using the following configuration for our grizzly server:
core worker threads: 2 maximum worker threads: 16 idle worker timeout: 30s transaction timeout: 10min
In case worker threads are scaled up and later removed regularly the DelayedExecutor.DelayQueue used by the AbstractThreadPool keeps a reference to the worker, which may lead to an OOM situation with huge amount of worker threads being referenced in that queue.
The worker threads are never removed from that queue in case a worker scale down is performed, since they are not removed in the onWorkerExit method, altough they were added in the onWorkerStarted method.
Affected Versions
[2.3.27]