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
Copy file name to clipboardExpand all lines: docbook/auth-server-docs/reference/en/en-US/modules/clustering.xml
+23Lines changed: 23 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,29 @@
57
57
database. This can be a relational database or Mongo. To make sure your database doesn't become a single
58
58
point of failure you may also want to deploy your database to a cluster.
59
59
</para>
60
+
<section>
61
+
<title>DB lock</title>
62
+
<para>Note that Keycloak supports concurrent startup by more cluster nodes at the same. This is ensured by DB lock, which prevents that some
63
+
startup actions (migrating database from previous version, importing realms at startup, initial bootstrap of admin user) are always executed just by one
64
+
cluster node at a time and other cluster nodes need to wait until the current node finishes startup actions and release the DB lock.
65
+
</para>
66
+
<para>
67
+
By default, the maximum timeout for lock is 900 seconds, so in case that second node is not able to acquire the lock within 900 seconds, it fails to start.
68
+
The lock checking is done every 2 seconds by default. Typically you won't need to increase/decrease the default value, but just in case
69
+
it's possible to configure it in <literal>standalone/configuration/keycloak-server.json</literal>:
70
+
<programlisting>
71
+
<![CDATA[
72
+
"dblock": {
73
+
"jpa": {
74
+
"lockWaitTimeout": 900,
75
+
"lockRecheckTime": 2
76
+
}
77
+
}
78
+
]]>
79
+
</programlisting>
80
+
or similarly if you're using Mongo (just by replace <literal>jpa</literal> with <literal>mongo</literal>)
Copy file name to clipboardExpand all lines: model/jpa/src/main/java/org/keycloak/connections/jpa/updater/liquibase/LiquibaseJpaUpdaterProviderFactory.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ public class LiquibaseJpaUpdaterProviderFactory implements JpaUpdaterProviderFac
0 commit comments