Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-2749

Client connection closed during heavy load connections to network server


    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s:
    • Fix Version/s: None
    • Component/s: Network Server
    • Labels:
    • Environment:
      Sun JDK 1.5.0


      I am using HA-JDBC to cluster two machines with ~3,5 GB of data. It is a mailserver which gets about 100 mails per minute with each mail causing several SQL reads and writes. After synchronizing the 3,5 GB which takes around 15 minutes, soon after that I get this exception:

      Caused by: java.sql.SQLException: Unzureichende Daten beim Lesen aus dem Netz. Erwartet wurden mindestens 6 Bytes, empfangen wurden jedoch nur -1 Bytes. Die Verbindung wurde beendet.
      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.executeUpdate(Unknown Source)
      at net.sf.hajdbc.sql.PreparedStatement$5.execute(PreparedStatement.java:144)
      at net.sf.hajdbc.sql.PreparedStatement$5.execute(PreparedStatement.java:142)
      at net.sf.hajdbc.sql.SQLObject$1.call(SQLObject.java:390)
      at net.sf.hajdbc.util.concurrent.SynchronousExecutor$SynchronousFuture.<init>(SynchronousExecutor.java:178)
      at net.sf.hajdbc.util.concurrent.SynchronousExecutor.submit(SynchronousExecutor.java:89)
      at net.sf.hajdbc.sql.SQLObject.executeWriteToDatabase(SQLObject.java:394)
      ... 11 more
      Caused by: org.apache.derby.client.am.DisconnectException: Unzureichende Daten beim Lesen aus dem Netz. Erwartet wurden mindestens 6 Bytes, empfangen wurden jedoch nur -1 Bytes. Die Verbindung wurde beendet.
      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.readExecute(Unknown Source)
      at org.apache.derby.client.net.StatementReply.readExecute(Unknown Source)
      at org.apache.derby.client.net.NetPreparedStatement.readExecute_(Unknown Source)
      at org.apache.derby.client.am.PreparedStatement.readExecute(Unknown Source)
      at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source)
      at org.apache.derby.client.am.PreparedStatement.executeUpdateX(Unknown Source)
      ... 18 more

      The number of bytes read is in fact 0; I filed DERBY-2747 for this. I think the reason for this is the server issuing a Socket.close(). This seems to be called only by DRDAConnThread.closeSession() which is called by

      • DRDAConnThread.handleException(Exception)
      • DRDAConnThread.run()
      • DRDAConnThread.sessionInitialState()

      I did not set any timeslice, so the bugs mentioned in DERBY-2026 and DERBY-2748 should not apply. A timeout cannot happen on the client, as this would yield a SocketTimeoutException and not a read() of -1, so for some reason I believe, the server seems to close the connection.




            • Assignee:
              kurti Kurt Huwig
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: