-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Memory leak in Tomcat #109
Comments
Hi. You should be able to use |
@daveray Thanks very much. After upgrading to 1.2.8 and adding the reset in a Listener, all the hystrix-Whatever-i threads are gone. That's pretty much what we wanted, although a new thread HystrixTimer_Tick appears and is not removed after undeploy: SEVERE: The web application [/api-0.0.1-SNAPSHOT] appears to have started a thread named [HystrixTimer_Tick] but has failed to stop it. This is very likely to create a memory leak. Thread details form JConsole: Name: HystrixTimer_Tick Stack trace: |
Yep. I guess the timer thread was missed. I'll leave it up to Ben whether we track that here, or reopen #102 . |
I'll get to this ... I've been swamped the last couple days but it's near the top of my list. |
We will keep an eye on it. Thanks! |
Can someone please review pull request #111 to ensure the concurrency code is correct? Unit tests all suggest it's good ... but it's concurrency so another set of eyes would be good. The thread shutdown should work with a thread interrupt or Hystrix.reset (that just uses interrupt to shut it down). The important part is making it so the thread can be restarted in a thread-safe manner and ensure only 1 instance after a reset occurs and more listeners are registered. |
Merged commit. Working on one other thing and will then release the next version to Maven Central. |
This has been released in 1.2.9. |
- the HystrixTimer can be shutdown via an interrupt (which Hystrix.reset uses) - the HystrixTimer will correctly restart the thread if it is used again after a reset Netflix#109
After stopping, undeploying or redeploying a Hystrix-powered webapp in Tomcat we find some errors as the following
SEVERE: The web application [/api-0.0.1-SNAPSHOT] appears to have started a thread named [hystrix-ProductsGroup-1] but has failed to stop it. This is very likely to create a memory leak.
Additionally, using JConsole we can see the threads, i.e. hystrix-ProductsGroup-1, are still alive.
We have tried to take control of the thread destruction setting withKeepAliveTimeMinutes as described here https://github.com/Netflix/Hystrix/wiki/Configuration , but found that the parameter is no longer available (1.2.5).
As a result, after a number of deploys, Tomcat ends with a PermGen error.
Can Hystrix remove these threads? Is there an alternative way we can get rid of the old threads?
Thanks in advance.
The text was updated successfully, but these errors were encountered: