File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Weblogic 6.0 connection get stuck

 
zan zang
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I hope someone can help me with an issue when I have my EJB talk to Oracle DB by weblogic 6.0 connection pool.

My sql data query takes around 15 minutes to finish(I have tested with JDBC to run the query, it works). but when I do the same sql query via connection pool, it just stuck there forever.
I have checked the database that the query has been finished in 15 minutes but somehow connection pool does not return the result to Java.

I think it might be the problem that webloigc 6.0 has considered the connection as a "stuck thread" (http://edocs.bea.com/wls/docs70/perform/WLSTuning.html#1125714)
But the thing is that document is for weblogic 7.0 and I am using 6.0 at the moment, can someone help me please.

Thanks a lot!

Cheers,
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried running the query with nothing else on the server.

Have you tried a small SQL query to verify that the Connection pool is functioning.

What driver are you using?

What timeouts have you set?

What is the code which does the query?

Also, WebLogic Server 6.0 is now very old, can you upgrade to 10?
 
zan zang
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roger,

Thanks for the reply,

Have you tried a small SQL query to verify that the Connection pool is functioning. Yes I did, and it works.

What driver are you using? I am using Oracle JDBC driver classes12.jar which works for all the other SQL query

What timeouts have you set? I don't know where I can set the timeout, but I have set the following:
Login Delay Seconds:0
Refresh Period:20 minutes
Shrink Period:30 minutes

What is the code which does the query? I am calling from Toplink with this API: executeQuery(query, arguments); As I said, all the other query work but just this one get stuck because it takes database more than 15 minutes to finish

Also, WebLogic Server 6.0 is now very old, can you upgrade to 10? No I cannot since I am not the boss and the application is very old.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another question: are you doing a read-only query. If not, what sort of transaction do you have. OK, that was two questions ...

Post the code which is failing.

Also, check the WebLogic Server logs and post any relevant entries such as stacktraces.
 
zan zang
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Yes, I am doing a read only query.

I think I have found the reason. It is because my SQL query takes more than 15 minutes to finish but weblogic has the capability to monitor all the thread, if a thread does not get a response in 10 minutes, weblogic will consider it as "stuck thread".

The solution is to either set the maximun idel time longer or stop having weblogic handle the connection. However, weblogic 6 does not have the option to change the default idel time (Which weblogic 7 does!), I just create my own JDBC connection to the database and the problem has been resolved.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic