I am facing a problem with WebSphere Connection Pool. My project environment is WebSphere 3.5.6 and MainframeDB2 through DB2Connect. I am getting Stale Connection Exception quite frequently. Here is the Exception details- StaleConnectionException=com.ibm.ejs.cm.portability.StaleConnectionException: [IBM][CLI Driver][DB2] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "184.108.40.206". Communication function detecting the error: "recv". Protocol specific error code(s): "*", "*", "0". SQLSTATE=08001
This will happen only , if no body uses the Application (connection for more than 10 minutes, and somebody start using it after around 10 minutes, the first person will get this error. then you will never get this error if application is continuously is use. Initially i thought this is because mainframe side connection is getting closed before the WAS connection IDLE time out. but from our appserver side, if we open and connection directly using db2Runtime(v 7.2) client, open a connection and execute the query after long time (more than 30 minutes) , you won't get any error. WAS DataSource also using the same runtime client. when you keep min connection pool parameter as 0 and idle time-out parameter less than 10 minutes , you won't get this error at all. Can anybody help, why this is happening, why i am getting a closed or stale connection after 10 minutes from the WAS connection pool Thanks Anish- IBM Global Services
ORPHAN_TIMEOUT - The number of seconds that an application is allowed to hold an inactive connection. The default is 1800 seconds (30 minutes). Any non-negative integer is a valid value. If there is no activity on an allocated connection for longer than the ORPHAN_TIMEOUT number of seconds, the connection is marked for orphaning. After another ORPHAN_TIMEOUT number of seconds, if the connection still has no activity, the connection is returned to the pool. If the application tries to use the connection again, it is thrown a StaleConnectionException. Connections that are enlisted in a transaction are not orphaned. Setting this value to 0 disables the orphan timeout.
subject: StaleConnectionException -WebSphere Connection Pool