Skip to content
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

class MetricsClientHttpRequestInterceptor - possible memory leak #26853

Closed
mbechtold1 opened this issue Jun 10, 2021 · 1 comment
Closed

class MetricsClientHttpRequestInterceptor - possible memory leak #26853

mbechtold1 opened this issue Jun 10, 2021 · 1 comment
Labels
status: duplicate A duplicate of another issue

Comments

@mbechtold1
Copy link

Spring Boot version 2.4.6

I have recently been researching a potential memory leak in our REST service. I believe I have narrowed it down to class MetricsClientHttpRequestInterceptor. Specifically it contain a static list named urlTemplate. I believe this list is growing without constraint and I have to question some code on lines 97-99 that follow:

if (urlTemplate.get().isEmpty()) {
urlTemplate.remove();			
}

Do we potentially need a NOT operator here so that items are removed from the list ?
Thank you for your consideration.

heapdump

@wilkinsona
Copy link
Member

Duplicates #25860.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

2 participants