• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Query Time out

 
Ranch Hand
Posts: 42
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
I am using Oracle JDBC Driver version - 9.0.2.0.0 in my JDBC based utility program.
the problem is when query takes more than 20-30 minutes to return the resuts ,I face "Time out" error.

I have tried printing getQueryTimeOut(); which will print '0' (Zero) I have read from JDBC API doc that Zero indicates Driver will wait for any amount of time once the query starts executing..
but still I do face this issue.
Even tried to setTimeout to some 30 minutes converting into seconds then also no gain.
can anyone tell me the workaround to this..

Thanks
Manjesh

 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you getting a SQLException or some other timeout oriented exception?

If the query itself is timing out then you should be getting a SQLException with a relevant message. You said the timeout is set to zero so it should not be timing out at all. However, there could be some other network or session config that is timing you out. I actually experienced a situtation where we thought a query was timing out but it turned out that there was a network config (I forgot exactly what it was) set to timeout due to inactivity. This timeout period happened to be shorter than the average execution time of our query; SQLException was not thrown in this case cause the SQL timeout did not happen. After we bumped it a bit all was fine.

What is the actual exception message thrown?

BTW, if your query is taking 30 plus minutes you may want to consider tuning it and/or the tables or database involved.
 
Manjesh Patil
Ranch Hand
Posts: 42
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ed Ward,
thanks for replay

There is no SQLException trace just it says :
WARNING: Read timed out
not able to figure out where is this time period is defined .
tuning the query wont help me lot coz Its reported that even after 5 minutes the warning message appears [WARNING: Read timed out]
I tried with query which will take 1-2 minutes that works fine ,problem is with the queries which will take 5+ minutes

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic