8000 Increase in startup memory consumption in post 26.5 versions · Issue #45662 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Increase in startup memory consumption in post 26.5 versions #45662

Closed

Description

@rnett

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

dist/quarkus

Describe the bug

Forked from #45459 (comment).

We run keycloak in our CI pipelines as a JAR (not in a container) using the Keycloak start script. We had inadvertently set a max heap of 256m via JAVA_OPTS globally on CI, but keycloak functions fine under this limit on pre-25.6 versions. After upgrading to 26.5.1, Keycloak started OOMing dugin startup. This was resolved by increasing the memory limit to 512m, so it was not a significant increase in absolute terms.

PS: I saw mention of #45498, but trying to disable swagger-ui via feature toggles did not work and threw errors about not recognizing that feature. What is the correct way to do this?

Version

26.5.1

Regression

  • The issue is a regression

Expected behavior

Keycloak's memory consumption during startup is not significantly increased.

Actual behavior

Keycloak's memory consumption increased enough we had to bump the max heap from 256m to 512m.

How to Reproduce?

Run the 26.5.1 JAR via the start script with a max heap of 256m. We do have some custom plugins so I'm not 100% it will reproduce.

Anything else?

Our installed plugin string is agroal, cdi, hibernate-orm, hibernate-validator, jdbc-postgresql, keycloak, narayana-jta, opentelemetry, reactive-routes, rest, rest-jackson, smallrye-context-propagation, smallrye-openapi, swagger-ui, vertx.

Activity

  1. added theissue type on Jan 21, 2026
  2. shawkins commented on Jan 21, 2026

    @shawkins
    Contributor

    @rnett using the configuration provided on the other issue, I couldn't cause an OOM during augmentation until going down to about 140m. Can you provide show-config output and more details of anything in the provider directory that may be contributing here?

    We have seen reports of other augmentation changes, such as #44310, and it will may be difficult for us and the quarkus team to figure out what is going on without a full reproducer.

  3. keycloak-github-bot commented on Jan 21, 2026

    @keycloak-github-bot

    Thanks for reporting this issue, but there is insufficient information or lack of steps to reproduce.

    Please provide additional details, otherwise this issue will be automatically closed within 14 days.

  4. rnett commented on Jan 21, 2026

    @rnett
    Author

    To be honest, considering we use some private/paid plugins, I doubt we'll be able to produce a realistic reproducer. If you've checked memory consumption on your side, which it sounds like you have, I think it's fine to close this issue.

    I'd still like to know how to disable the swagger ui, or if there's anything I need to do there, though 🙂

  5. mabartos commented on Jan 22, 2026

    @mabartos
    Member

    @rnett Swagger UI will be completely disabled in the next 26.5.x release. See: #45499

    I've noticed that the hibernate-validator consumes ~170ms of startup time, which is quite a lot in a context of startup routines - so maybe there's also some additional memory consumption.

  6. shawkins commented on Jan 22, 2026

    @shawkins
    Contributor

    Thank you for the update @rnett. @mabartos are you good with marking this as resolved via #45499 and #45677?

  7. mabartos commented on Jan 22, 2026

    @mabartos
    Member

    @shawkins I'm just running some benchmark comparison for the startup memory usage in 26.4.7 and 26.5.1. So, after these results, I'll have more information. But it seems there's no major problem between these releases.

  8. mabartos commented on Jan 22, 2026

    @mabartos
    Member

    I've checked the difference between 26.4.7 and 26.5.1, and I don't see a big difference.

    Image Image

    The majority of the difference is caused by the #45677:

    Image

    And some slight increase for the RESTEasy and Arc (but it's very negligible).

    Thank you for the update @rnett. @mabartos are you good with marking this as resolved via #45499 and #45677?

    @shawkins Yes, I think we can close this issue by resolving those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Fields

    No fields configured for bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0