WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  How to fix stale connection in websphere application Server ( without modifying application code )

    Posted Wed August 17, 2016 09:57 AM

    Hi 

     

    I am getting stale connection during MS SQL Server failover ( happening automatically ), and during that time websphere throwing stale connection ( min connection is zero  ). I did all available setting for stale connection

    min connection to 0 for connection pool

    WebSphere Application Server data source properties

    like 

    Validate new connections Validate existing pooled connections

     

    I set SQL driver custom property logintimeout to 300 seconds ( Even after setting to 300, getting connection error in 15 seconds ( default ).. Is there any PMR or any solution to come out from this issue? Team is not interested to take care of this stale connection inside the java code.. Need suggestion

     

    in fact there is a session Management properties StaleConnectionRetry, not helping me to fix..

     

    Need your advicce to come out..



  • 2.  RE: How to fix stale connection in websphere application Server ( without modifying application code )

    Posted Wed August 17, 2016 11:39 AM

    Hi can you please share below details:

    1.WAS complete version.

    2.WAS server logs .Error time-stamp



  • 3.  RE: How to fix stale connection in websphere application Server ( without modifying application code )

    Posted Tue September 13, 2016 06:00 AM

    I think you are getting dependent stale connection issue. Once check purge policy is set to "entira pool" and restart the environment. Even still u r getting same issue means once check your driver type compatable has drivers for ur DB. 

    I hope this may help you.thanks



  • 4.  RE: How to fix stale connection in websphere application Server ( without modifying application code )

    Posted Thu September 15, 2016 12:48 PM

    If you are talking about DB stale connections, there is a setting under Data sources - <ds-name> - WebSphere Application server data source properties for "connection validation properties".  If you select Validate new connections & validate existing pooled connections, it will handle a stale connection.

    Restart of server is required.



  • 5.  RE: How to fix stale connection in websphere application Server ( without modifying application code )

    Posted Wed September 28, 2016 11:36 AM

    Thank you for all your replied.. 

     

    Websphere version : 8.5.5.9

    JDK 1.6

    SQL Driver is 4.0

    I did all the possibilities even Mr. Eric Clarke mentioned.. but it is not cleaning / purging the stale connection ( still wondering why ).. now IBM is telling..to stop the stale connection, need to update sql driver to 4.1 / 4.2. still my question is cleaning connection pool is IBM Responsible to do cleaning up by purge.. not able to see the logs proof to see the purge details..  Yes erver restart  will help but we are loosing transactions cos of stale connection.. still issue with in transaction connections. how to take care of that from websphere container?



  • 6.  RE: How to fix stale connection in websphere application Server ( without modifying application code )

    Posted Thu September 29, 2016 11:59 AM

    If it helps, it sounds like you are doing all the right things. We are using 4.0 MS SQL driver without an issue.  The only other thing I could suggest is to run a trace on your jdbc connections so you have "all the details in exactly what is happening".  If you have done that as well then perhaps in your installation you do need the new driver. Good luck. I haven't run a trace for MS SQL but you should be able to find the information under "trouble shooting" => logs & trace in the console.  Good luck.



  • 7.  RE: How to fix stale connection in websphere application Server ( without modifying application code )

    Posted Wed October 05, 2016 08:27 PM

    Have you checked your connection pool properties in the WAS console? i.e your Aged timeout, reap timeout, unused etc.