PQ72406: UNEXPECTED CONNECTION CLOSE BY ORPHAN ALARM THREAD BEFORE EXECUTE STATEMENT & APPLICATION GOT STALECONNECTIONEXCEPTION.

 Fixes are available

4.0.6: WebSphere Application Server Version 4.0 Fix Pack 6
WebSphere Application Server Connection Manager Cumulative Fix
4.0.2-4.0.7: Component cumulative Connection Manager fix



APAR status
Closed as program error.

Error description
There is very delicate timing which might cause this issue.
If number of used connection is 0, and then application get
connection from pool, it would be possible that connection is
closed by orphan alarm thread before executing statement.
In another words, application has possibility of getting
StaleConnectionException triggered by CM behavior,
however application and DB works fine.
.
Sequence:
1. There is no inuse connection on connection pool.
2. Orphan timeout passes
3. Application getconnection from pool.
4. before executing statement, if orphan time is passed again
   at this point, application will get StaleConnectionException.
   (because connection was closed by Orphan thread)
.
Below is sample output of CM trace. Connection was closed
before executing statement.
================================================================

 03/03/18 4:21:33:880 JST  1298fe02 WebGroup
I SRVE0091I:  ServletLog : teststale3: TestStale3.service() No.3
get connection
 03/03/18 4:21:33:883 JST  1298fe02 DataSourceImp
> getConnection
 03/03/18 4:21:33:900 JST  1298fe02 DataSourceImp
< getConnection
 03/03/18 4:21:33:956 JST   1967e06 ConnectionPoo
> alarm
 03/03/18 4:21:33:957 JST   1967e06 ConnectO
> checkForOrphan
 03/03/18 4:21:33:958 JST   1967e06 ConnectionPoo
E connectionOrphaned
 03/03/18 4:21:33:959 JST   1967e06 ConnectionPro
> connectionOrphaned
 03/03/18 4:21:33:960 JST   1967e06 ConnectionPro
> close
 03/03/18 4:21:33:961 JST   1967e06 Proxy
> close
 03/03/18 4:21:33:962 JST   1967e06 Proxy
D Mark proxy closed
 03/03/18 4:21:33:963 JST   1967e06 Proxy
< close
 03/03/18 4:21:33:971 JST   1967e06 ConnectionPro
< close
 03/03/18 4:21:33:972 JST   1967e06 ConnectionPro
< close
 03/03/18 4:21:33:972 JST   1967e06 ConnectionPro
< connectionOrphaned
 03/03/18 4:21:33:973 JST   1967e06 ConnectO
W CONM6020W: A Connection has been Orphaned and returned
to pool TestDataSource.
 03/03/18 4:21:34:282 JST   1967e06 ConnectO
< checkForOrphan
 03/03/18 4:21:34:283 JST   1967e06 ConnectionPoo
< alarm
================================================================
Local fix Problem summary
****************************************************************
* USERS AFFECTED: Customers using WebSphere Application Server *
*                 4.0 and WebSphere connection pooling.        *
****************************************************************
* PROBLEM DESCRIPTION: Connections may be closed due to an     *
*                      incorrect orphan timeout.  This         *
*                      results in a StaleConnectionException   *
*                      with a message of "The Connection is    *
*                      closed" being thrown when the           *
*                      application uses the connection.        *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
A timing window existed where if a connection was removed from
the connection pool with a getConnection() call, but no work was
done on the connection before the orphan timer went off, the
connection would be incorrectly detected as an orphaned
connection and returned to the free pool.  When the application
did attempt to do work on the connection, a
StaleConnectionException would occur.
Problem conclusion
Fixed the orphan timeout logic so that when a connection is
retrieved from the pool, the orphan timer is reset.
Temporary fix Comments
APAR information
APAR number PQ72406
Reported component name WEBSPHERE AE AI
Reported component ID 5630A2200
Reported release 400
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Submitted date 2003-03-24
Closed date 2003-04-02
Last modified date 2003-05-21

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:
PQ74409

Modules/Macros
JDBC          

SRLS

Fix information

Applicable component levels
R400 PSY    UP


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > General
Operating system(s):
Software version: 400
Software edition:
Reference #: PQ72406
IBM Group: Software Group
Modified date: May 21, 2003