Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 7064 invoked from network); 11 Nov 2010 20:28:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Nov 2010 20:28:06 -0000 Received: (qmail 20519 invoked by uid 500); 11 Nov 2010 20:28:37 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 20475 invoked by uid 500); 11 Nov 2010 20:28:37 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 20456 invoked by uid 99); 11 Nov 2010 20:28:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Nov 2010 20:28:37 +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; Thu, 11 Nov 2010 20:28:36 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oABKSFgT024186 for ; Thu, 11 Nov 2010 20:28:16 GMT Message-ID: <27540251.34281289507295788.JavaMail.jira@thor> Date: Thu, 11 Nov 2010 15:28:15 -0500 (EST) From: "Fuad Efendi (JIRA)" To: dev@lucene.apache.org Subject: [jira] Commented: (SOLR-2233) DataImportHandler - JdbcDataSource is not thread safe In-Reply-To: <918792.29101289494154738.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-2233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931187#action_12931187 ] Fuad Efendi commented on SOLR-2233: ----------------------------------- This is exception I was talking about, threads="16", 12 sub-entities, with existing trunk version, note *The connection is closed* {code} org.apache.solr.handler.dataimport.DataImportHandlerException: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. at org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:64) at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.hasnext(JdbcDataSource.java:337) at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.access$600(JdbcDataSource.java:226) at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator$1.hasNext(JdbcDataSource.java:260) at org.apache.solr.handler.dataimport.EntityProcessorBase.getNext(EntityProcessorBase.java:75) at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:73) at org.apache.solr.handler.dataimport.ThreadedEntityProcessorWrapper.nextRow(ThreadedEntityProcessorWrapper.java:84) at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner.runAThread(DocBuilder.java:433) at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner.run(DocBuilder.java:386) at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner.runAThread(DocBuilder.java:453) at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner.access$000(DocBuilder.java:340) at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner$1.run(DocBuilder.java:393) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:171) at com.microsoft.sqlserver.jdbc.SQLServerConnection.checkClosed(SQLServerConnection.java:319) at com.microsoft.sqlserver.jdbc.SQLServerStatement.checkClosed(SQLServerStatement.java:956) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:348) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:915) at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.hasnext(JdbcDataSource.java:329) ... 13 more {code} > DataImportHandler - JdbcDataSource is not thread safe > ----------------------------------------------------- > > Key: SOLR-2233 > URL: https://issues.apache.org/jira/browse/SOLR-2233 > Project: Solr > Issue Type: Bug > Affects Versions: 1.5 > Reporter: Fuad Efendi > Attachments: FE-patch.txt, SOLR-2233-JdbcDataSource.patch > > > Whenever Thread A spends more than 10 seconds on a Connection (by retrieving records in a batch), Thread B will close connection. > Related exceptions happen when we use "threads=" attribute for entity; usually exception stack contains message "connection already closed" > It shouldn't happen with some JNDI data source, where Connection.close() simply returns Connection to a pool of available connections, but we might get different errors. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org