Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 39102 invoked from network); 13 Jan 2006 13:12:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jan 2006 13:12:31 -0000 Received: (qmail 83421 invoked by uid 500); 13 Jan 2006 13:12:21 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 83349 invoked by uid 500); 13 Jan 2006 13:12:20 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 83338 invoked by uid 99); 13 Jan 2006 13:12:20 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jan 2006 05:12:20 -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 (asf.osuosl.org: domain of gary.larsen@envisn.com designates 63.166.217.30 as permitted sender) Received: from [63.166.217.30] (HELO mail.pshift.com) (63.166.217.30) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jan 2006 05:12:19 -0800 Received: from dataman4 (66-189-97-84.dhcp.oxfr.ma.charter.com [66.189.97.84]) by mail.pshift.com (Vircom SMTPRS 4.2.425.24) with ESMTP id for ; Fri, 13 Jan 2006 08:11:59 -0500 X-Modus-ReverseDNS: OK X-Modus-BlackList: 66.189.97.84=OK;gary.larsen@envisn.com=OK X-Modus-RBL: 66.189.97.84=OK X-Modus-Trusted: 66.189.97.84=NO From: "Gary Larsen" To: Subject: Cron job not releasing memory Date: Fri, 13 Jan 2006 08:11:58 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Thread-Index: AcYYQu7lgCcHYZeFRUuAQVqAAZ5Ecw== X-Virus-Checked: Checked by ClamAV on apache.org Message-Id: <20060113131219.E6A5610FB012@asf.osuosl.org> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I posted this in the user list without any feedback so I'm trying here. I'm running a periodic background process to maintain data in eXist. I'm using Cocoon 2.1.7 and have set up a schedule to run every minute by setting up a trigger in cocoon.xconf: 0 0/1 * * * ? * The trigger executes a class that manages the scheduling of a job, and if it needs to, it adds a new entry: JobScheduler scheduler = (JobScheduler)this.manager.lookup(JobScheduler.ROLE); SynchronizerDaemon daemon = createSynchronizerDaemon(context); scheduler.addPeriodicJob(SynchronizerDaemon.class.getName(), daemon, minutes, false, null, null); The job runs on schedule perfectly but there appears to a problem with the job execution releasing resources. Each run of the job adds to the memory consumption and eventually will create an out of memory error. I tried to track down the memory leak with JProfiler. I had the app run the job only once. After execution the resources that were created when the job started still exist. Here are a few lines from the allocation call tree that was created from the job which show that PooledExecutor$Worker.run is not being released: 80.6% - 44,761 kB - 661,134 alloc. EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run 80.5% - 44,738 kB - 660,138 alloc. org.quartz.core.JobRunShell.run 79.9% - 44,375 kB - 654,219 alloc. com.envisn.nv.sync.SynchronizerDaemonImpl.execute 79.9% - 44,375 kB - 654,219 alloc. com.envisn.nv.sync.SynchronizerDaemonImpl.doActiveSync I was going to try upgrading but looking at the cron block in 2.1.8 nothing has changed except for setting some request attributs in setup(). Tracking this down is beyond by skills right now. Would anyone have some ideas on the problem or an alternate scheduling solution? Thanks for any advice, Gary