Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-4872

MSSQL realm creation/deletion deadlocks

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Minor
    • None
    • 3.1.0.Final
    • Storage
    • None
    • Hide

      My test to reproduce the issue basically spins up 10 threads and each thread will create a realm and then immediately delete that realm. It does this via the admin rest API.

      The test currently does that create/delete cycle 50 times but it's always only 10 active threads at a time.

      You don't actually need the fifty times as (at least for me) it starts happening when the first ten hit the server.

      Show
      My test to reproduce the issue basically spins up 10 threads and each thread will create a realm and then immediately delete that realm. It does this via the admin rest API. The test currently does that create/delete cycle 50 times but it's always only 10 active threads at a time. You don't actually need the fifty times as (at least for me) it starts happening when the first ten hit the server.
    • NEW
    • NEW

    Description

      If I have multiple realms being created or deleted at the same time via API I am getting a bunch of deadlocks reported by the JDBC driver which causes the requests to fail.

      I've attached both the wildfly log that shows the JDBC errors and a SQL Server Profiler trace that has capture the deadlocks. Almost all the deadlocks are in KEYCLOAK_ROLE. The last couple appear to be in COMPONENT_CONFIG but I'm not sure if that's actually an issue or a side affect of the previous issues.

      I've tested this with Postgres and I don't run into any deadlock issues there so it seems to be strictly an MSSQL problem.

      I also looked at KEYCLOAK-3210 but flipping the parameter doesn't have any affect

      Attachments

        Issue Links

          Activity

            Public project attachment banner

              context keys: [headless, issue, helper, isAsynchronousRequest, project, action, user]
              current Project key: KEYCLOAK

              People

                hmlnarik@redhat.com Hynek Mlnařík
                dbarentine_jira Dane Barentine (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: