I am experiencing a slow failover when simulating a network failure. My setup consists of the following: Two servers, each with an instance of JBoss and MySQL running on them. I will refer to the servers as a ?primary? and ?backup?. Both the primary and backup have their DataSources set to point to the MySQL instance running on the primary server. They are HA DataSources, so they also point to the backup server. I simulate a network failure by unplugging the primary from a network hub. Then the following happens:
1) The backup server/node detects the failure.
2) Several minutes go by after the cluster failure, and then our app is deployed.
After playing with Log4j settings and some more testing, I have narrowed the issue down to a set of failures:
2006-10-26 15:50:34,843 INFO [org.hibernate.connection.DatasourceConnectionProvider] Using datasource: java:/DefaultDS 2006-10-26 15:51:06,343 WARN [org.jboss.resource.adapter.jdbc.local.HALocalManagedConnectionFactory] Destroying connection that is not valid 2006-10-26 15:51:50,484 WARN [org.jboss.resource.adapter.jdbc.local.HALocalManagedConnectionFactory] Destroying connection that is not valid 006-10-26 15:52:28,437 WARN [org.jboss.resource.adapter.jdbc.local.HALocalManagedConnectionFactory] Destroying connection that is not valid 2006-10-26 15:52:49,578 WARN [org.jboss.resource.adapter.jdbc.local.HALocalManagedConnectionFactory] Failed to create connection for jdbc:mysql://nscluster-3:4589/netsight: Communications link failure