This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques and have Mario Casciaro & Luciano Mammino on-line!
See this thread for details.
Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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

 
The government thinks you are too stupid to make your own lightbulb choices. But this tiny ad thinks you are smart:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic