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

Problems with jdbc loadbalance (2 replies)

$
0
0
Hi to all. I encountered on the problem, solution for which I can't find a long. I have application, which works on Tomcat, uses Apache DBCP and JDBC connector 5.1.25, Spring Framework and hibernate. I have 2 MySQL Servers, where replication is set. In JDBC's connection string I insert "loadbalance" and two out MySQL serveres as hosts. When I turn off first server (just shut down for example), my application hangs, and it seems that is tries to connect to offline MySQL server. And it lasts a long time.

I tried to configure connectTimeout and socketTimeout in JDBC's connection string, but it didn't help :(
Could anybody tell me where is a problem?

Thanks!

Viewing all articles
Browse latest Browse all 884

Trending Articles



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