jdbc - DB2 Query Timeout issue - How to handle -


this may have been asked numerous times none of them helped me far.

here's history:

  • querytimeout: 120 secs
  • database:db2
  • app server: jboss
  • framework: struts 2

i've 1 query fetches around million records. yes, need fetch @ once caching purpose, sadly can't change design. now, we've 2 servers primary , dr. in dr server, query getting executed within 30 secs, no timeout issue there. in primary serverit getting time out due unknown reason. getting timed out in rs.next() , sometime in pstmt.executequery(). db indexes, connection pool etc in place. explain plan shows, there no full table scan well.

my analysis:

since query not issue here, there might issue in network delay? how can root cause behind timeout. how can make sure there no connection leakage? (since connection closed properly). way recover timeout , again execute query increased timeout value e.g: pstmt.setquerytimeout(600)? <- note has no effect whatsoever. don't know why..!

appreciate inputs.

thank you!


Comments