-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Large number of "SimplePauseDetectorThread_0" threads in GradleWorkerMain #15654
Comments
Thanks for the report but it's hard to know what is going on with the details that you've shared. If you have a large number of tests that are using the spring integration and a somewhat important number of context configurations (you've only shown one class), then one context per configuration will be created and I can see the number of threads increasing in that scenario. Please review the documentation regarding context caching. If that guess does not match your setup, please share more details, a small sample would be ideal. |
Hi! Thank you so much for that information, it was just what I needed. It took a while to figure out what this meant in practice for my Gradle setup:
Which did not help much, but fortunately I found this text in the code for Reads a {@code spring.properties} file from the root of the Spring library classpath It did not make immediate sense to me, but after thinking about it for a while I figured out that it probably means I can put the file in
Now my tests are running nicely with less memory consumption, fewer threads, and (unscientifically) it felt faster. This also means I can use Gradle's This also resolves the issue with Gradle 5+ having workers that have 512MB max heap by default (instead of 25% of system RAM) - the subproject test suites no longer blow away all the available RAM which would cause the workers to OOM if I did not add a custom jvmargs with a larger heap in the I wrote the above as detailed as I could so that is preserved for posterity. I also created this StackOverflow post. |
Very nice @bes and thanks for the feedback. I am glad you were able to resolve this issue. |
Hi!
I have a somewhat complicated Spring Boot app, with a large number of tests.
When running the tests, it seems to be accumulating a lot of threads, one of which there is multiple instances of and is called "SimplePauseDetectorThread_0", which I traced down to this dependency
This seems to happen on Spring Boot 2.0.6 as well as 2.1.1.
A typical test may look like this:
My actuator config looks like this:
Please see the attached screenshots:
Please tell me if I can be of further assistance.
Thanks!
The text was updated successfully, but these errors were encountered: