Hey Nicolo,
Have you tried configuring the connection validation on a background thread?
<datasource jndi-name="...>
<pool>
...
</pool>
<security>
...
</security>
<validation>
<check-valid-connection-sql>SELECT
1</check-valid-connection-sql>
<background-validation>true</background-validation>
<background-validation-millis>10000</background-validation-millis>
</validation>
</datasource>
________________________________________
From: keycloak-user-bounces(a)lists.jboss.org [keycloak-user-bounces(a)lists.jboss.org] on
behalf of Nicolò Di Domenico [ndido98(a)gmail.com]
Sent: Friday, October 25, 2019 3:01 AM
To: keycloak-user(a)lists.jboss.org
Subject: Re: [keycloak-user] Database connection spurious failure when adding a new
client via admin-cli
I tried to update the server configuration file by using the one directly
bundled with Keycloak 7.0.1, but the problem still persists. Any ideas?
Il giorno lun 21 ott 2019 alle ore 17:09 Nicolò Di Domenico <
ndido98(a)gmail.com> ha scritto:
Hello everyone,
I’m currently struggling with an issue that appears with no regular
pattern whatsoever. I’m deploying Keycloak to a server via Ansible, and
later in the playbook I create a new client using its dedicated module. The
problem is that the first time everything’s fine, but when I call the
playbook again to make some modifications, it sometimes gets stuck when
using admin-cli to add the client: if that happens, the server returns with
a 500 error and everything stops. By looking at the logs, it looks like
that Keycloak for some reason loses connection to the MariaDB server, and
it won’t make it again until I restart Keycloak manually, because every
subsequent database connection will fail.
I’ll leave down here the link to a gist with the server logs, the
standalone.xml configuration file, and MariaDB and its JDBC version.
https://gist.github.com/ndido98/971e19ba2b071f34d37055d973234e7e
Thank you in advance for your help.
Greetings,
Nicolò
_______________________________________________
keycloak-user mailing list
keycloak-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user