Repository navigation
Description
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
admin/api
Describe the bug
When attempting to retrieve a large user base (20,000+ users) via the Admin REST endpoint GET /auth/admin/realms/{realm}/users?first=0&max=100000&briefRepresentation=false, the request exceeds Keycloak's default 5-minute (300-second) JTA transaction timeout. The
JTA transaction reaper rolls back the transaction, resulting in a truncated, corrupt JSON payload returned to the client and downstream connection errors.
Version
main
Regression
- The issue is a regression
Expected behavior
transaction should not timeout and response should be returned in reasonable time.
Actual behavior
transaction timeout
How to Reproduce?
Create a large dataset of local users (5000 is enough) with some attributes and enabled user profile unmanaged attributes on the realm. Then clear the cache and measure response time of GET /auth/admin/realms/{realm}/users?first=0&max=100000&briefRepresentation=false
Anything else?
No response
Activity
shawkins commentedon Aug 25, 2026
For the potentially large memory footprint created by calls like this, even when streams are returned by the rest endpoint, it relates to #48651 and #49028
9 remaining items
GET /userspagination becomes unresponsive on LDAP-federated realms #52742 as a duplicate of this issueImprove retrieval of large read-only resources via admin API (#52658)
Improve retrieval of large read-only resources via admin API