db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6831) org.apache.derby.client.am.DisconnectException: A communications error has been detected: Read timed out.
Date Mon, 07 Sep 2015 15:14:46 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14733829#comment-14733829
] 

Bryan Pendleton commented on DERBY-6831:
----------------------------------------

I looked at your log and didn't see anything particularly surprising. I think you will need
to do some more investigation to be able to narrow down the problem. That is why I
suggested running in Embedded mode, because it might simplify the configuration and
give you more of a clue about what sort of problem you're having.

Right now, I don't understand what the problem is. Do you think you have a performance
problem? A networking problem? An error in your database? A query that is giving the
wrong results?

Here's one idea: follow these techniques to make sure that you're getting the *ENTIRE*
information from the exception that you receive on the client side: 
http://wiki.apache.org/db-derby/UnwindExceptionChain

Are you calling setQueryTimeout or setLoginTimeout or a similar JDBC call in
your application? If you are, have you tried modifying your application to either
remove that call, or to make a longer timeout value for your application?

Can you identify *EXACTLY* which SQL statement gives you the timeout, by
looking at the stack trace to see where you are in your program, or possibly
by modifying your application to record which SQL statement caused the
timeout? If so, can you determine if it is ALWAYS the same statement, or
if the timeout varies from run to run?

If you can identify a particular SQL statement which is problematic, can you
use a tool like ij or SQLSquirrel to execute that statement interactively,
and observe whether it executes correctly on its own?

Hopefully these suggestions will help you provide a more precise description
of the problem you are trying to solve.


>  org.apache.derby.client.am.DisconnectException: A communications error has been detected:
Read timed out.
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6831
>                 URL: https://issues.apache.org/jira/browse/DERBY-6831
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.5.3.0
>         Environment: Windows 2003
>            Reporter: Ashlesha
>         Attachments: derby_Allstmt.zip
>
>
> We are using derby server 10.5.3.0 version with our product where we are consistently
getting below connection timed out error   :
> Caused by: java.sql.SQLException: A communications error has been detected: Read timed
out.
> 	at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
> 	at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
> 	at org.apache.derby.client.am.PreparedStatement.executeQuery(Unknown Source)
> 	at com.ibm.ac.si.iuregistry.IUTypeDatabaseImpl.orderInstanceIDsByTimeStamp(IUTypeDatabaseImpl.java:7359)
> 	at com.ibm.ac.si.iuregistry.IUTypeDatabaseImpl.listUndoOrder(IUTypeDatabaseImpl.java:10124)
> 	... 18 more
> Caused by: org.apache.derby.client.am.DisconnectException: A communications error has
been detected: Read timed out.
> 	at org.apache.derby.client.net.NetAgent.throwCommunicationsFailure(Unknown Source)
> 	at org.apache.derby.client.net.Reply.fill(Unknown Source)
> 	at org.apache.derby.client.net.Reply.ensureALayerDataInBuffer(Unknown Source)
> 	at org.apache.derby.client.net.Reply.readDssHeader(Unknown Source)
> 	at org.apache.derby.client.net.Reply.startSameIdChainParse(Unknown Source)
> 	at org.apache.derby.client.net.NetStatementReply.readOpenQuery(Unknown Source)
> 	at org.apache.derby.client.net.StatementReply.readOpenQuery(Unknown Source)
> 	at org.apache.derby.client.net.NetStatement.readOpenQuery_(Unknown Source)
> 	at org.apache.derby.client.am.Statement.readOpenQuery(Unknown Source)
> 	at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source)
> 	at org.apache.derby.client.am.PreparedStatement.executeQueryX(Unknown Source)
> 	... 21 more
> Caused by: java.net.SocketTimeoutException: Read timed out
> 	at java.net.SocketInputStream.socketRead0(Native Method)
> 	at java.net.SocketInputStream.read(SocketInputStream.java:155)
> 	... 31 more
> The derby logs doesn't show any error message but for the last prepared statement query
it waits for sometime (around 5 mins) and then our program comes out i.e it ends with connection
timed out error .
> Derby log statements :
> 2015-09-03 09:40:01.308 GMT Thread[DRDAConnThread_8,5,derby.daemons] (XID = 6580), (SESSIONID
= 3), (DATABASE = IURegistryDB), (DRDAID = NF000001.G418-1011056675071531060{4}), Begin compiling
prepared statement: SELECT IUI.INSTANCE_ID FROM IU_INSTANCE IUI WHERE IUI.INSTANCE_ID IN (?,?)
ORDER BY IUI.CREATED_TIME DESC :End prepared statement
> 2015-09-03 09:40:01.308 GMT Thread[DRDAConnThread_8,5,derby.daemons] (XID = 6580), (SESSIONID
= 3), (DATABASE = IURegistryDB), (DRDAID = NF000001.G418-1011056675071531060{4}), End compiling
prepared statement: SELECT IUI.INSTANCE_ID FROM IU_INSTANCE IUI WHERE IUI.INSTANCE_ID IN (?,?)
ORDER BY IUI.CREATED_TIME DESC :End prepared statement
> 2015-09-03 09:40:01.324 GMT Thread[DRDAConnThread_8,5,derby.daemons] (XID = 6580), (SESSIONID
= 3), (DATABASE = IURegistryDB), (DRDAID = NF000001.G418-1011056675071531060{4}), Executing
prepared statement: SELECT IUI.INSTANCE_ID FROM IU_INSTANCE IUI WHERE IUI.INSTANCE_ID IN (?,?)
ORDER BY IUI.CREATED_TIME DESC :End prepared statement with 2 parameters begin parameter #1:
NULL :end parameter begin parameter #2: f26326912b681e5b:77389106:14f73d7488b:-778a :end parameter

> 2015-09-03 09:42:03.105 GMT Thread[DRDAConnThread_9,5,derby.daemons] (XID = 424), (SESSIONID
= 3), (DATABASE = TouchPointRegistryDB), (DRDAID = NF000001.G534-868067386902462499{5}), Rolling
back
> 2015-09-03 09:42:03.105 GMT Thread[DRDAConnThread_9,5,derby.daemons] (XID = 424), (SESSIONID
= 3), (DATABASE = TouchPointRegistryDB), (DRDAID = NF000001.G534-868067386902462499{5}), Rolling
back
> 2015-09-03 09:48:54.777 GMT Thread[DRDAConnThread_7,5,derby.daemons] (XID = 382), (SESSIONID
= 1), (DATABASE = TouchPointRegistryDB), (DRDAID = NF000001.H380-508905316620002396{3}), Committing
> 2015-09-03 09:48:54.777 GMT Thread[DRDAConnThread_5,5,derby.daemons] (XID = 6545), (SESSIONID
= 1), (DATABASE = IURegistryDB), (DRDAID = NF000001.H37F-592784859679789228{2}), Committing
> 2015-09-03 09:48:54.777 GMT Thread[DRDAConnThread_7,5,derby.daemons] (XID = 382), (SESSIONID
= 1), (DATABASE = TouchPointRegistryDB), (DRDAID = NF000001.H380-508905316620002396{3}), Rolling
back
> 2015-09-03 09:48:54.777 GMT Thread[DRDAConnThread_7,5,derby.daemons] (XID = 382), (SESSIONID
= 1), (DATABASE = TouchPointRegistryDB), (DRDAID = NF000001.H380-508905316620002396{3}), Rolling
back
> 2015-09-03 09:48:54.777 GMT Thread[DRDAConnThread_5,5,derby.daemons] (XID = 6545), (SESSIONID
= 1), (DATABASE = IURegistryDB), (DRDAID = NF000001.H37F-592784859679789228{2}), Rolling back
> 2015-09-03 09:48:54.777 GMT Thread[DRDAConnThread_5,5,derby.daemons] (XID = 6545), (SESSIONID
= 1), (DATABASE = IURegistryDB), (DRDAID = NF000001.H37F-592784859679789228{2}), Rolling back
> Not sure why derby connection is timed out. Could you please go through the derby log
and help us to understand the cause of failure?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message