Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all articles
Browse latest Browse all 884

MySQL connection does not work when slave db is down using sql connector 5.1.39 (3 replies)

$
0
0
We are using Java with a MySQL database. My SQL connector - 5.1.39.

URL :

jdbc:mysql://host1:port1,host1:port2/schema?allowSlaveDownConnections=true&loadBalanceBlacklistTimeout=50000&readFromMasterWhenNoSlaves=true

In the above URL, host1:port1 is the master and host1:port2 is the slave db .

Now, from the SQL connector - 5.1.38 , the parameter - allowSlaveDownConnections=true, should allow the connections even when the slave is down.

But practically, when the slave is down, the connection is not going through at all and getting a "connection timed out" error.

Please assist me in solving this issue. The goal is to get the app working even when the slave is down.

Viewing all articles
Browse latest Browse all 884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>