You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Increase in startup memory consumption in post 26.5 versions #45662
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.
@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.
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 🙂
@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.
@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.
Activity
shawkins commentedon Jan 21, 2026
@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.
keycloak-github-bot commentedon Jan 21, 2026
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.
rnett commentedon Jan 21, 2026
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 🙂
mabartos commentedon Jan 22, 2026
@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.
shawkins commentedon Jan 22, 2026
Thank you for the update @rnett. @mabartos are you good with marking this as resolved via #45499 and #45677?
mabartos commentedon Jan 22, 2026
@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.
mabartos commentedon Jan 22, 2026
I've checked the difference between 26.4.7 and 26.5.1, and I don't see a big difference.
The majority of the difference is caused by the #45677:
And some slight increase for the RESTEasy and Arc (but it's very negligible).
@shawkins Yes, I think we can close this issue by resolving those.