AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

oracle jdbc hangs on socket read

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases
View previous topic :: View next topic  
Author Message
FareChase
Guest





PostPosted: Thu Jul 10, 2003 4:44 pm    Post subject: oracle jdbc hangs on socket read Reply with quote



Just wondering if anyone has seen this (and has a solution).

ENV: Linux 7.3, Oracle 8.1.7, using 9.2.0.3 oracle jdbc driver.

Most times, everything works fine, with operations usually under 10
milliseconds. Occasionally an operation takes up to 61 seconds
(executing a query, closing a result set, getting a connection, etc).
When I dump the VM, the jdbc code is always at a socket read, like this:

"main" prio=1 tid=0x804e110 nid=0x6d6c runnable [0xbfffc000..0xbfffcc24]
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:85)
at oracle.net.ns.Packet.receive(Unknown Source)
at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:726)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:698)
at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:103)
at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.java:466)
at
oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:441)
at
oracle.jdbc.driver.OracleConnection.privateCreateStatement(OracleConnection.java:477)
at
oracle.jdbc.driver.OracleConnection.createStatement(OracleConnection.java:386)
at DBTest.test(DBTest.java:25)
at DBTest.main(DBTest.java:11)

It's not the query itself that takes a long time, but, for example,
closing the result set (which for some reason causes a socket read,
which hangs for a while).

I've seen some postings on the oracle forums but no real solutions.

Thanks,
Tom Gordon

Back to top
Joseph Weinstein
Guest





PostPosted: Thu Jul 10, 2003 5:12 pm    Post subject: Re: oracle jdbc hangs on socket read Reply with quote





FareChase wrote:

Quote:
Just wondering if anyone has seen this (and has a solution).

ENV: Linux 7.3, Oracle 8.1.7, using 9.2.0.3 oracle jdbc driver.

Most times, everything works fine, with operations usually under 10
milliseconds. Occasionally an operation takes up to 61 seconds
(executing a query, closing a result set, getting a connection, etc).
When I dump the VM, the jdbc code is always at a socket read, like this:

"main" prio=1 tid=0x804e110 nid=0x6d6c runnable [0xbfffc000..0xbfffcc24]
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:85)
at oracle.net.ns.Packet.receive(Unknown Source)

You should maybe get some investigation going at the DBMS end. That's where the
delay is. This trace just indicates that the JDBC driver is simply waiting for the
DBMS to respond.
Joe Weinstein at BEA

Quote:

at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:726)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:698)
at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:103)
at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.java:466)
at
oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:441)
at
oracle.jdbc.driver.OracleConnection.privateCreateStatement(OracleConnection.java:477)
at
oracle.jdbc.driver.OracleConnection.createStatement(OracleConnection.java:386)
at DBTest.test(DBTest.java:25)
at DBTest.main(DBTest.java:11)

It's not the query itself that takes a long time, but, for example,
closing the result set (which for some reason causes a socket read,
which hangs for a while).

I've seen some postings on the oracle forums but no real solutions.

Thanks,
Tom Gordon


Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.