While checking SystemOut.log during a reported slowness in the application I found StaleConnectionException occuring frequently. This exception was not observed earlier and I doubt that if this is the reason for slowness and needs to be resolved.
Asked
Active
Viewed 668 times
1 Answers
0
StaleConnectionException
usually happens, when WebSphere was disconnected from the database. It can be caused by database restart or by network issue e.g. firewall which disconnects requests after some time. If it happens frequently, make sure that Purge policy
for that datasource is set to Entire Pool
, not Failing Connections
. If you have firewall between WAS and DB set Aged timeout
to lower value than timeout on firewall (try with 1200 for example).
Can this be a reason for slowness?
It can a bit, as when application gets StaleConnectionException
, that request is failing and either application has implemented logic to retry it or end user will get error and will retry the same request.

Gas
- 17,601
- 4
- 46
- 93
-
One of the connection in application code was not closed before exiting from the method in which the connection was created. In the sysout logs the exception was being traced back to the line where an unclosed connection was created. Once we changed the code we didnt get stale connection exception but slowness still persists. What other reasons can be there for slowness?? – user3892653 Aug 19 '14 at 16:15