Articles

What causes stale connections?

What causes stale connections?

The most common cause of StaleConnectionException is due to retrieving connections from the database connection pool and finding out that the connection has timed out or dropped when it was unused for a long time. You can configure your application server to avoid this exception.

What is stale connection in WebSphere?

In WebSphere Application Server, the StaleConnectionException is issued when the database vendor issues an exception indicating that a connection currently in the connection pool is no longer valid. The application tries to use a JDBC™ resource, such as a statement, obtained on a now-stale connection.

What is stale connection in Weblogic?

You will get the “Invalid or Stale Connection” error when you have a connection in the connection pool which is no longer connected to the Database actively.

What does it mean when a connection is stale?

Stale connections are connections that remain either available or borrowed, but are no longer being used. Stale connections that remain borrowed may affect connection availability. In addition, stale connections may impact system resources that are otherwise wasted on maintaining unused connections for extended periods of time.

Why do I get stale connection in WebSphere?

In WebSphere Application Server, the StaleConnectionException is issued when the database vendor issues an exception indicating that a connection currently in the connection pool is no longer valid. This can happen for many reasons, including: The application tries to get a connection and fails, as when the database is not started.

What is a stale connection exception in Java?

A StaleConnectionException is an exception that is generated by the Java™ application server profile database connection code when a JDBC driver returns an unrecoverable error from a connection request or operation.