[jboss-jira] [JBoss JIRA] Resolved: (JBAS-3851) Slow DataSource Failover - JCA Stale Connection Detection

Weston Price (JIRA) jira-events at jboss.com
Sat Jan 20 16:13:52 EST 2007


     [ http://jira.jboss.com/jira/browse/JBAS-3851?page=all ]

Weston Price resolved JBAS-3851.
--------------------------------

    Fix Version/s: JBossAS-5.0.0.CR1
                   JBossAS-4.2.0.CR1
       Resolution: Done

Added fast fail property to immediately stop attempting to acquire a connection from the pool on the first failure. The offending connection is destroyed and a new connection immediately created. This is a performance optimization and is configurable via the *-ds.xml file. 

> Slow DataSource Failover - JCA Stale Connection Detection
> ---------------------------------------------------------
>
>                 Key: JBAS-3851
>                 URL: http://jira.jboss.com/jira/browse/JBAS-3851
>             Project: JBoss Application Server
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: JCA service
>    Affects Versions: JBossAS-4.0.5.GA, JBossAS-4.0.4.GA
>         Environment: Windows XP Pro SP2, Java 1.5.0_05
>            Reporter: Jason Sicotte
>         Assigned To: Weston Price
>             Fix For: JBossAS-5.0.0.CR1, JBossAS-4.2.0.CR1
>
>
> JBoss customer support recommends I log our issue as a feature request.  The following is my original description of the issue:
> "We are seeing a slow DataSource failover.  I have attached a log file which shows said failover.  The lines of interest are:
> 15:50:34,843 INFO  [DatasourceConnectionProvider] Using datasource: java:/DefaultDS
> <a bunch of stack traces>
> 15:52:49,578 WARN  [HALocalManagedConnectionFactory] Failed to create connection for jdbc:mysql: ....
> 15:52:49,671 INFO  [SettingsFactory] RDBMS: MySQL, version: 4.1.7-nt
> This shows it takes about 135 seconds for the database failover.
> Some details on my setup:
> I have two clustered JBoss instances running on two computers.  Both nodes are also running an instance of MySQL.  Node 1 has the "primary" database, and Node 2 has a replicated "backup".  Both JBoss instances have the HA DataSource configured to point to the MySQL server running on Node 1 first.  To replicate the issue, I disconnect the network cable from Node 1.  This then causes Node 2 to become the HA singleton master and a DataSource failover to the "backup" database."
> The issue I just described seemed to be caused by the connection pool staying alive while each connection failed.  So even though the first connection dies, the others must fail in succession for the failure to be complete.
> According to  Luc Texier, the crux of the issue is:
> "Each connection is individually checked when a client requests it. The issue is that  the validation is performed by the connection factory e.g. BaseWrapperManagedConnectionFactory.isValidConnection() which is blocking other validations while  the socket is wondering what's going on.  After the timeout, this first connection is failing over but the second one has to be validated anyway...then blocking, timeout and so on"
> What we need here is for the pool to be invalidated if a single connection failure is detected.  Perhaps add it as an option to turn on/off?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list