Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 20827 invoked from network); 18 Aug 2010 01:17:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Aug 2010 01:17:56 -0000 Received: (qmail 88529 invoked by uid 500); 18 Aug 2010 01:17:56 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 88484 invoked by uid 500); 18 Aug 2010 01:17:56 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 88477 invoked by uid 99); 18 Aug 2010 01:17:55 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Aug 2010 01:17:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Aug 2010 01:17:38 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7I1HGZq010358 for ; Wed, 18 Aug 2010 01:17:16 GMT Message-ID: <31269738.410701282094236149.JavaMail.jira@thor> Date: Tue, 17 Aug 2010 21:17:16 -0400 (EDT) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Issue Comment Edited: (DERBY-2026) Setting a login timeout in client driver can lead to query timeout In-Reply-To: <6197514.1162379176492.JavaMail.root@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899670#action_12899670 ] Kathey Marsden edited comment on DERBY-2026 at 8/17/10 9:16 PM: ---------------------------------------------------------------- Attached is a patch for this issue derby-2026_diff.txt which builds on Mamta's change. There were two more instances when the soTimeout needed to be reset after completing the connection. The change Mamta made was the path for DriverManger. The other two cases were after completing the connections obtained from DataSources and also after reset of pooled conenctions. Tests have been added to ConnectTest for DriverManager and J2EEDataSourceTest for the data sources. I have not yet run regressions, but will do so tonight.. Please review Thanks Kathey was (Author: kmarsden): Attached is a patch for this issue derby-2026_diff.txt which builds on Mamta's change. There were two more instances when the soTimeout needed to be reset after completing the connection. The change Mamta made was the path for DriverManger. The other two cases were after completing the DataSources and aslo after reset of pooled conenctions. Tests have been added to ConnectTest for DriverManager and J2EEDataSource for the data sources. I have not yet run regressions, but will do so tonight.. Please review Thanks Kathey > Setting a login timeout in client driver can lead to query timeout > ------------------------------------------------------------------ > > Key: DERBY-2026 > URL: https://issues.apache.org/jira/browse/DERBY-2026 > Project: Derby > Issue Type: Bug > Components: JDBC, Network Client > Affects Versions: 10.3.1.4 > Environment: Client driver on most platforms > Reporter: Olav Sandstaa > Assignee: Mamta A. Satoor > Priority: Minor > Attachments: derby-2026_diff.txt, DERBY2026_LoginTimeout_diff_patch1.txt, LoginTimeout.java, LoginTimeoutWithDataSource.java > > > Setting the login timeout by using DriverManager.setLoginTimeout(int > seconds) also affects the amount of time the client driver is waiting > for a query to finish. For instance, setting the login timeout to 10 > seconds will result in any queries taking more than 10 seconds to fail > with the following exception: > Exception thrown: java.sql.SQLException: A communications error has been detected: Read timed out. > java.sql.SQLException: A communications error has been detected: Read timed out. > at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:46) > at org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:345) > at org.apache.derby.client.am.Statement.executeQuery(Statement.java:414) > at LoginTimeout.main(LoginTimeout.java:53) > 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(NetAgent.java:408) > at org.apache.derby.client.net.Reply.fill(Reply.java:176) > at org.apache.derby.client.net.Reply.ensureALayerDataInBuffer(Reply.java:215) > at org.apache.derby.client.net.Reply.readDssHeader(Reply.java:317) > at org.apache.derby.client.net.Reply.startSameIdChainParse(Reply.java:1147) > at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(NetStatementReply.java:51) > at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(StatementReply.java:40) > at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(NetStatement.java:139) > at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Statement.java:1341) > at org.apache.derby.client.am.Statement.flowExecute(Statement.java:1977) > at org.apache.derby.client.am.Statement.executeQueryX(Statement.java:420) > at org.apache.derby.client.am.Statement.executeQuery(Statement.java:405) > ... 1 more > Caused by: java.net.SocketTimeoutException: Read timed out > at java.net.SocketInputStream.socketRead0(Native Method) > at java.net.SocketInputStream.read(SocketInputStream.java:129) > at org.apache.derby.client.net.Reply.fill(Reply.java:174) > ... 11 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.