<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">
<table style="color:#000000;font-family:georgia;font-size:8pt;line-height:12pt;margin-left:-4px;padding:0;" class="">
<tbody class="">
<tr class="">
<td style="line-height: 12pt;" class=""><font face="Helvetica" class=""><span style="font-size: 12px;" class="">Hi Stian,<br class="">
</span></font><br class="">
Ok, thanks. I see. Maybe it is not related to Wildfly 10 after all.. I honestly do not know.<br class="">
<br class="">
I just read this comment 'I can confirm that on Wildfly 10 you need validate-on-match true otherwise Wildfly will never reconnect successfully to the connection pool if you bounce MySQL. I've tried background validation and is doesn't work. I think this is
 a bug.&nbsp;‘<font size="1" class="">&nbsp;(<a href="http://stackoverflow.com/questions/28707650/wildfly-and-auto-reconnect-to-the-database" class="">http://stackoverflow.com/questions/28707650/wildfly-and-auto-reconnect-to-the-database</a></font><span style="font-size: x-small;" class="">)
 and did not investigate it any further..</span><font size="1" class=""><br class="">
</font><br class="">
cheers<br class="">
<br class="">
Edgar<br class="">
<br class="">
</td>
</tr>
</tbody>
</table>
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 21 Jul 2016, at 14:53, Stian Thorgersen &lt;<a href="mailto:sthorger@redhat.com" class="">sthorger@redhat.com</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Do you have any reference to the bug in WildFly?
<div class=""><br class="">
</div>
<div class="">We upgraded to WildFly 10 a long time ago in 1.8.1.</div>
</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On 21 July 2016 at 14:34, Edgar Vonk - <a href="http://info.nl" class="">
Info.nl</a> <span dir="ltr" class="">&lt;<a href="mailto:Edgar@info.nl" target="_blank" class="">Edgar@info.nl</a>&gt;</span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
We also recently had an issue where Keycloak stopped working because it could no longer get any (Oracle) DB connections from the connection pool. This was not after a restart but just during normal operation.<br class="">
<br class="">
We had configured the DB connection pool to use background-validation and this has worked fine until recently.<br class="">
<br class="">
As mentioned in <a href="http://stackoverflow.com/questions/28707650/wildfly-and-auto-reconnect-to-the-database" rel="noreferrer" target="_blank" class="">
http://stackoverflow.com/questions/28707650/wildfly-and-auto-reconnect-to-the-database</a> (linked from:
<a href="https://issues.jboss.org/browse/KEYCLOAK-3204" rel="noreferrer" target="_blank" class="">
https://issues.jboss.org/browse/KEYCLOAK-3204</a>) the issue seems to be that starting from Wildfly 10 (?) this background validation no longer works due to a bug in Wildfly. As suggested there we have now configured the connection pool with validate-on-match
 set to true and we hope this will resolve the issue.<br class="">
<br class="">
We only started to see this issue after upgrading to Keycloak 2.0.0 and I think that is where Wildfly was upgraded to version 10? Or maybe it was just bad luck..<br class="">
<br class="">
The stack trace we had:<br class="">
<br class="">
<br class="">
Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/KeycloakDS<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:146)<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.as.connector.subsystems.datasources.WildFlyDataSource.getConnection(WildFlyDataSource.java:66)<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:386)<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:87)<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; ... 71 more<br class="">
Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/KeycloakDS<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:656)<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:429)<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:747)<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:138)<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; ... 75 more<br class="">
Caused by: javax.resource.ResourceException: IJ000655: No managed connections available within configured blocking timeout (30000 [ms])<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.getConnection(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:564)<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:626)<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:598)<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:590)<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; ... 78 more<br class="">
<div class="HOEnZb">
<div class="h5">_______________________________________________<br class="">
keycloak-user mailing list<br class="">
<a href="mailto:keycloak-user@lists.jboss.org" class="">keycloak-user@lists.jboss.org</a><br class="">
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank" class="">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>