Uploaded image for project: 'Red Hat build of Keycloak'
  1. Red Hat build of Keycloak
  2. RHBK-3331

RHBK Duplicate resource error ERROR: duplicate key value violates unique constraint

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      After migration to 26.2.4 there is a quite frequently (at least once a day for 1500 login attempts)  ERROR: duplicate key value violates unique constraint "constraint_offl_us_ses_pk2"

      Note that we have 2 keycloak instances targeting the same DB but when the error occur there is no switching from 1 server to another (all the logs are from the same instance).
      The DB is postgresql 15.10. The KC_CACHE is set to ispn and KC_CACHE_STACK to jdbc-ping.
      I tried to reproduce manually to find some patterns but could not.
      Note that the error occurs on a realm where all the clients are SAML clients from other realms. The login flow just redirects to an external IDP.

      related upstream issue is https://github.com/keycloak/keycloak/issues/40374 

       

              mposolda@redhat.com Marek Posolda
              mposolda@redhat.com Marek Posolda
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: