Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 80881 invoked from network); 1 Dec 2006 06:21:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Dec 2006 06:21:55 -0000 Received: (qmail 41899 invoked by uid 500); 1 Dec 2006 06:22:00 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 41688 invoked by uid 500); 1 Dec 2006 06:21:57 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 41673 invoked by uid 99); 1 Dec 2006 06:21:57 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Nov 2006 22:21:57 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Nov 2006 22:21:23 -0800 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1Gq1lJ-0000K5-Kh for derby-user@db.apache.org; Thu, 30 Nov 2006 22:20:41 -0800 Message-ID: <7634026.post@talk.nabble.com> Date: Thu, 30 Nov 2006 22:20:41 -0800 (PST) From: Suraj Batuwana To: derby-user@db.apache.org Subject: Re: Error when executing query:com.ibm.websphere.ce.cm.StaleConnectionException: Meta-data for Container org.apache.derby.impl.store.raw.data.RAFContainer@6fd148fc could not be accessed In-Reply-To: <456E2AD7.1080808@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: sbatuwana@virtusa.com References: <65E39BDC90312B48BD2C4B4F9F0B5B143F9047@CS-MAILSVR02.Virtusa.com> <65E39BDC90312B48BD2C4B4F9F0B5B143F904F@CS-MAILSVR02.Virtusa.com> <455DD44D.5060600@amberpoint.com> <7440385.post@talk.nabble.com> <456E2AD7.1080808@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi Suresh, Many thanks for the reply. Yes, as you said jdk15 does not have the above issue. But now the big problem is my application does not support jdk15. Is there a way we can have a fix for the above issue with using the jdk14 ? -Suraj Suresh Thalamati wrote: > > Suraj Batuwana wrote: >> createDB.sql in the attached zip file has all the sqls for database >> tables, >> indexes and views >> Error comes when run SELECT * FROM >> vwDerbyBasePackage_derbygen_DerbyRepositoryObject67ceb178 >> >> Can use the CreateDatabase.bat to create the derby database and >> TestIssue.bat can use to test the issue. >> derby.log has the error I am getting. >> >> Above was tested with derby 10.2.1.6 but get the same results >> >> Please let me know if any one of you able to reproduce the issue >> >> > > Suraj , > > Thanks a lot for providing scripts to reproduce the error. I am able > to reproduce the problem you are seeing on jdk14 and jdk13. Query work > s fine on jdk15. As I mentioned earlier , I think this error is > happening because too many files are kept open(> 2000). On jdk14 ,you > are hitting the jvm bug. > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4189011, that cause > the above error, when a container file opens. > > Now the obvious question is why derby is keeping so many files open to > compile the query ? > > view "vwDerbyBasePackage_derbygen_DerbyRepositoryObject67ceb178" is > pretty huge and uses other views. Total of no of user > tables are 1197, and there are 2301 index containers. This query > opened 2078 container files when I ran on jdk15. I could not find any > cases in rawstore where files are not getting closed correctly. > > By doing quick scan of the code, I think during the query > optimization Derby opens all the tables and all the indexes on each > table to estimate the costs and those containers are not closed until > the nested transaction used to compile the query is closed. Because > the containers used to estimate the cost are not closed, > corresponding container files can not be closed, so the container > cache (file handle cache ) keep growing. May be it is > not really required to keep all containers open until the end of > compiling the query. Optimizer gurus , please correct me if I am > saying something that is incorrect here. > > > Thanks > -suresh > > > > > > > > > > > > > > > > > > > -- View this message in context: http://www.nabble.com/Error-when-executing-query%3Acom.ibm.websphere.ce.cm.StaleConnectionException%3A-Meta-data-for-Container-org.apache.derby.impl.store.raw.data.RAFContainer%406fd148fc-could-not-be-accessed-tf2634449.html#a7634026 Sent from the Apache Derby Users mailing list archive at Nabble.com.