Skip to content

Spring boot, jersey, actuator, variable path element URLs => OOM under moderate load #12943

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

Closed
gsoertsz opened this issue Apr 23, 2018 · 2 comments
Labels
status: duplicate A duplicate of another issue

Comments

@gsoertsz
Copy link

gsoertsz commented Apr 23, 2018

With Spring Boot 2.x, actuator metric collection around web-request timing is enabled by default. Using Jersey as the ReST provider, results in JavaHeapErrors and OOM under moderate load when target GET requests to an endpoint with variable path elements.

I've published a repo here containing the test project to help reproduce the issue. The service is configured in the build to expose the java management port at 9010 so that something like visualvm can address it.

Notes:

  • setting management.metrics.web.server.auto-time-requests=false prevents the OOM from occurring (GC can catch up)
  • excluding actuator as a dependency also fixes the issue
  • adding a metric filter to exclude http.server.requests also fixes the issue.
  • NOT using Jersey avoids the issue
  • NOT using variable element URLs avoids the issue.

Project contains a branch for the performance baseline without auto-timing enabled. The project is docker based with some basic instructions included.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 23, 2018
@ctytgat
Copy link

ctytgat commented Apr 25, 2018

Same issue here after upgrading to spring boot 2. Having variable path elements is practically always the case so this is quite annoying.
Apparently micrometer timers have a large memory footprint.

@wilkinsona
Copy link
Member

Duplicate of #12447.

@wilkinsona wilkinsona added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 25, 2018
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

4 participants