8000 Improve retrieval of large read-only resources via admin API · Issue #52033 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Improve retrieval of large read-only resources via admin API #52033

Closed

Description

@martin-kanis

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

  1. added theissue type on Aug 25, 2026
  2. added
    area/storageStorage layer — JPA entities, database schemas, Liquibase migrations, caching
    and removed on Aug 25, 2026
  3. self-assigned this
    on Aug 25, 2026
  4. shawkins commented on Aug 25, 2026

    @shawkins
    Contributor

    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

  5. 9 remaining items

  6. added a commit that references this issue on Sep 16, 2026
    c7bc1e6
  7. added a commit that references this issue on Sep 16, 2026
    87dfb70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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