Pawan Kumar
Pawan Kumar

Reputation: 164

application shows connection error when db is restarted

I'm working on java j2ee app. Every time when there is DB activity and DB is restarted the application goes down and we are force to bounce the app server. Once app server is bounced it works fine

Regards Pawan

Upvotes: 1

Views: 807

Answers (1)

techuser soma
techuser soma

Reputation: 4877

This can happen due to Stale Connections. In such scenarios, an Exception is thrown indicating that the connection is Stale or invalid.

In the application it is possible to catch a Stale Connection Exception and retry the call. It can also be controlled by the connection timeout or time to live properties. Check with your DBA or the server administrator to see if there are any properties on the connection that is causing this.

Upvotes: 1

Related Questions