Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 57904 invoked from network); 7 May 2010 14:45:35 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 May 2010 14:45:35 -0000 Received: (qmail 95302 invoked by uid 500); 7 May 2010 14:45:34 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 95281 invoked by uid 500); 7 May 2010 14:45:34 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 95274 invoked by uid 99); 7 May 2010 14:45:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 14:45:34 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of fschiettecatte@gmail.com designates 209.85.221.195 as permitted sender) Received: from [209.85.221.195] (HELO mail-qy0-f195.google.com) (209.85.221.195) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 14:45:25 +0000 Received: by qyk33 with SMTP id 33so1926849qyk.24 for ; Fri, 07 May 2010 07:45:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=mVRNw3yl56Ul30edRe8YK7pJQuJjO+jJGhGg9h4WGCo=; b=dVZx7HELeQr3O+kPwgRhg/CLUVDcyw364A0PFkLL4Mfx28RG4mS3ZtH6VpO9P1We65 t6rHMOA0BfmP3ky3+K1Y28JaEdy4T3C6G3LKHXShHFTwettbGYTKOQjEINDl42XX/oKQ tVaBbNlGUXGkO8HeFotiqZ1NQ95j8OBPAmJp4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=KxkW0cfBQ6Vw5Q6R+JLbwlTqhxGQNCCZfr3AOFq8vwR3xuHZIj4M2xoM8X177PQPSf +GZ1dZt7ttWyycuP1XoNNVAcn9BAqpFBS0cCifXY6QzqiFG4mLDSgKhb4A/yItn1Q4qw zozIq8YZUHKNu/8XJa2gWRfPg2Dxi3rRTIgco= Received: by 10.224.121.211 with SMTP id i19mr2409484qar.5.1273243023531; Fri, 07 May 2010 07:37:03 -0700 (PDT) Received: from macpro.local (c-24-61-174-153.hsd1.ma.comcast.net [24.61.174.153]) by mx.google.com with ESMTPS id bv23sm1191414qcb.7.2010.05.07.07.37.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 07 May 2010 07:37:02 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1078) Subject: Re: interesting exception in 3.0 From: =?iso-8859-1?Q?Fran=E7ois_Schiettecatte?= In-Reply-To: Date: Fri, 7 May 2010 10:37:00 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <8485B306-4104-42CB-9D3B-25CA2AC8204A@gmail.com> References: To: user-java@ibatis.apache.org X-Mailer: Apple Mail (2.1078) X-Virus-Checked: Checked by ClamAV on apache.org Clinton Thanks for pinging me. I have not had a chance to look at it, and it is still an issue, before = rushing out and creating a jira ticket for it I wanted to look at the = code diffs between the two releases, I will try to get to it later today = or this WE. Fran=E7ois On May 7, 2010, at 10:33 AM, Clinton Begin wrote: > Let me know if this is still a problem, and create a JIRA ticket if it = is. I should have some time this weekend to look into it. >=20 > Clinton >=20 > On Wed, May 5, 2010 at 9:16 PM, Clinton Begin = wrote: > Two things to do: >=20 > * Create a JIRA ticket for this. We'll continue conversation and > investigation there. >=20 > * Mount the source and step through one example transaction. See if > you can verify that close isn't being called, and possibly why. >=20 > * Finally, out of curiosity, disable caching globally, and see if the > problem remains. >=20 > I did find one refactoring that is in this area. I'll attempt to > recreate and verify this too. >=20 > Clinton >=20 > 2010/5/5 Fran=E7ois Schiettecatte : > > Clinton > > > > A little more information on this, I reverted back to 240 and the = problem I reported did not occurs after a 24 hour run. I then went to = the current release and the problem reappeared, everything else is the = same, so there is an issue. > > > > What it looks like is going on is that connections are not being put = back into the connection pool after they are closed and so time out when = they are subsequently used by iBatis. MySQL is set to close connections = after 60 seconds and the pool is set to close them after being idle for = 50 seconds. Yet what I am seeing is that connections are being used = quite some time after the last packets have been sent over the wire: > > > > ### Error querying database. Cause: = com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications = link failure > > The last packet successfully received from the server was 60,858 = milliseconds ago. The last packet sent successfully to the server was 0 = milliseconds ago. > > ### The error may involve = dictionaries.Category.selectObjectByCategoryID-Inline > > ### The error occurred while setting parameters > > ### Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: = Communications link failure > > > > What it feels like is that iBatis is hanging onto the connection and = reusing it at a later time. > > > > What do you need from me to track this down? > > > > Cheers > > > > Fran=E7ois > > > > > > > > On May 1, 2010, at 4:28 PM, Clinton Begin wrote: > > > >> Then no, I don't believe there have been any changes related to > >> connections or transactions between those versions. You can have a > >> look at the change log if you like: > >> > >> = https://issues.apache.org/jira/secure/BrowseProject.jspa?id=3D10601&subset= =3D-1 > >> > >> Or the subversion history as well. > >> > >> Clinton > >> > >> 2010/5/1 Fran=E7ois Schiettecatte : > >>> I am using JDBC, with C3P0 as my data source. > >>> > >>> Cheers > >>> Fran=E7ois > >>> > >>> On May 1, 2010, at 4:14 PM, Clinton Begin wrote: > >>> > >>>> The only code changes related to that were with managed = transactions. > >>>> Which transacion manager are you using? (JDBC or MANAGED)? > >>>> > >>>> Cheers, > >>>> Clinton > >>>> > >>>> 2010/5/1 Fran=E7ois Schiettecatte : > >>>>> Hi > >>>>> > >>>>> I grabbed the latest, greatest release of 3.0 from : > >>>>> > >>>>> = http://people.apache.org/builds/ibatis/ibatis-3-core/ibatis-core-3.0-bundl= e.zip > >>>>> > >>>>> and am now getting an exception from time to time, but I was not = getting it with the previous 3.0 beta release (240). I was wondering if = there had been any change in the code which deals with connections and = pool between those two releases. What it looks like to me is that = connections are not being returned to the pool after I close the = SqlSession. I have mysql set to timeout idle connections after 60 = seconds and the connection pool to time out idle connections after 50 = seconds. Again this was not an issue in 240. > >>>>> > >>>>> Any suggestions? > >>>>> > >>>>> Cheers > >>>>> > >>>>> Fran=E7ois > >>>>> > >>>>> > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] ERROR = com.poplar.crawler.Worker - = org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFacto= ry.java:8) > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] ERROR = com.poplar.crawler.Worker - = org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSql= Session.java:61) > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] ERROR = com.poplar.crawler.Worker - = org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSql= Session.java:53) > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] ERROR = com.poplar.crawler.Worker - = org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlS= ession.java:38) > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] ERROR = com.poplar.crawler.Worker - = com.poplar.sql.IBatis.selectObject(IBatis.java:554) > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] ERROR = com.poplar.crawler.Worker - = com.poplar.db.dictionaries.Category.fromCategoryName(Category.java:118) > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] ERROR = com.poplar.crawler.Worker - = com.poplar.db.items.ItemCategory.(ItemCategory.java:201) > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] ERROR = com.poplar.crawler.Worker - = com.poplar.db.items.ItemCategory.(ItemCategory.java:227) > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] ERROR = com.poplar.crawler.Worker - = com.poplar.db.items.Item.addItemCategory(Item.java:2182) > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] ERROR = com.poplar.crawler.Worker - = com.poplar.crawler.processors.FeedProcessor.processEntryCategories(FeedPro= cessor.java:2494) > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] ERROR = com.poplar.crawler.Worker - = com.poplar.crawler.processors.FeedProcessor.process(FeedProcessor.java:823= ) > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] ERROR = com.poplar.crawler.Worker - = com.poplar.crawler.Worker.crawl(Worker.java:1313) > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] ERROR = com.poplar.crawler.Worker - = com.poplar.crawler.Worker.crawlSourceKey(Worker.java:681) > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] ERROR = com.poplar.crawler.Worker - = com.poplar.crawler.Worker.run(Worker.java:591) > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] ERROR = com.poplar.crawler.Worker - = java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.= java:886) > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] ERROR = com.poplar.crawler.Worker - = java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java= :908) > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] ERROR = com.poplar.crawler.Worker - java.lang.Thread.run(Thread.java:619) > >>>>> 2010-05-01 01:54:20,609 [pool-1-thread-1] WARN = com.poplar.crawler.Worker - Failed to crawl the source key: = 'C01240E19154BE7BDA3703F726D5A68190D4A540', exception: = 'org.apache.ibatis.exceptions.IbatisException: > >>>>> ### Error querying database. Cause: = com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications = link failure > >>>>> > >>>>> The last packet successfully received from the server was = 104,024 milliseconds ago. The last packet sent successfully to the = server was 0 milliseconds ago. > >>>>> ### The error may involve = dictionaries.Category.selectObjectByCategoryName-Inline > >>>>> ### The error occurred while setting parameters > >>>>> ### Cause: = com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications = link failure > >>>>> > >>>>> The last packet successfully received from the server was = 104,024 milliseconds ago. The last packet sent successfully to the = server was 0 milliseconds ago.'. > >>>>> > >>>>> > >>>>> = --------------------------------------------------------------------- > >>>>> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org > >>>>> For additional commands, e-mail: = user-java-help@ibatis.apache.org > >>>>> > >>>>> > >>>> > >>>> = --------------------------------------------------------------------- > >>>> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org > >>>> For additional commands, e-mail: user-java-help@ibatis.apache.org > >>>> > >>> > >>> > >>> = --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org > >>> For additional commands, e-mail: user-java-help@ibatis.apache.org > >>> > >>> > >> > >> = --------------------------------------------------------------------- > >> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org > >> For additional commands, e-mail: user-java-help@ibatis.apache.org > >> > > > > > > = --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org > > For additional commands, e-mail: user-java-help@ibatis.apache.org > > > > >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org For additional commands, e-mail: user-java-help@ibatis.apache.org