The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

"RapidMiner Server complains that a database connection was closed. How can I re-establish it"

User13User13 Member Posts: 155 Maven
edited May 2019 in Knowledge Base

Problem:

JBoss pools SQL connections. When connections are closed for various reasons (errors, timeouts, network problems), it does not realize that this has happens and returns closed connections the next time they are required.

Solution:

Force JBoss to check whether the connection is still live before returning them from the pool. If not, it will re-establish the connection. To achieve this, insert the following into the standalone.xml configuration file (found under standalone/configuration):


<check-valid-connection-sql> sql code</check-valid-connection-sql>

after the XML element


<validate-on-match>true</validate-on-match>

For sql code, insert arbitrary (fast) SQL code like


SELECT 1

or (for Microsoft SQL Server)


SELECT 1 FROM sysobjects

Note that this may very slightly influence performance. You may also want to try setting


<background-validation>false</background-validation>

to


<background-validation>true</background-validation>


Tagged:
Sign In or Register to comment.