Re: Communication link failure in load balance mode
Posted by: Filipe Silva
Date: June 05, 2020 01:38PM


Looks like you are hitting a session timeout somewhere in the active connection. I wonder why it is failing in a call to `commit()`, though.

Anyway, what are the exact versions of Connector/J and Tomcat you are using?

This could be related to the way Tomcat validates connections in the pool. By using load-balancing connections with a connection pool you risk not being able to actually validate (keep-alive) all the physical connections inside of each of of the virtual load-balanced connections.

I would suggest you to play around with a few knobs. 1st, check where your timeouts are and how much time you have to keep connections/sessions active in each place (connection pool, servers, proxies, etc) and try to be in sync; 2nd, try different validation methods in the connection pool settings. For example, by default Tomcat sends a "SELECT 1" statement to MySQL to validate connections, which works fine for most cases (including the fail-over mode you said its working for you) but may not work other cases. I'd suggest you to replace this setting to "/* ping */ SELECT 1" (write it exactly as-is, spaces and all).


Options: ReplyQuote

Written By
Re: Communication link failure in load balance mode
June 05, 2020 01:38PM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.