From owner-freebsd-java@FreeBSD.ORG Thu Jul 6 13:14:34 2006 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45B2D16A4DF for ; Thu, 6 Jul 2006 13:14:34 +0000 (UTC) (envelope-from kurt@intricatesoftware.com) Received: from mta1.srv.hcvlny.cv.net (mta1.srv.hcvlny.cv.net [167.206.4.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id E65ED43D55 for ; Thu, 6 Jul 2006 13:14:33 +0000 (GMT) (envelope-from kurt@intricatesoftware.com) Received: from [172.16.1.72] (ool-457a77e8.dyn.optonline.net [69.122.119.232]) by mta1.srv.hcvlny.cv.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTP id <0J1Z00GWQGSU78C0@mta1.srv.hcvlny.cv.net> for freebsd-java@freebsd.org; Thu, 06 Jul 2006 09:14:54 -0400 (EDT) Date: Thu, 06 Jul 2006 09:14:22 -0400 From: Kurt Miller In-reply-to: <1152134883.7788.12.camel@detri015.speed.planet.nl> To: freebsd-java@freebsd.org, martijn@detrics.com Message-id: <200607060914.23131.kurt@intricatesoftware.com> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-6 Content-transfer-encoding: 7BIT Content-disposition: inline References: <1152082235.30307.19.camel@detri015.speed.planet.nl> <200607051503.35873.kurt@intricatesoftware.com> <1152134883.7788.12.camel@detri015.speed.planet.nl> User-Agent: KMail/1.9.3 Cc: Subject: Re: Apache Tomcat crash on 6.1 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2006 13:14:34 -0000 Hi Martijn, On Wednesday 05 July 2006 5:28 pm, Martijn Veening wrote: > Hi Kurt, thnx for suggestions, > > Indeed it seems that java process memory increases, although the reading > is different from the tomcat manager reading. The size started at 450M > (res 100M) and after 6 hours increased to 600M (res 160M). I can imagine > that if that continues another 10 hours, the 1 Gb limit is reached > causing crash. > Tomcat however read lower memory-usage, but that will be memory within > the JVM-reserved memory, which differs from the process-memory in > FreeBSD (I presume). Right, tomcat reported memory usage doesn't account for memory the jvm uses in addition to the java object heap. Hmmm, looking over the original bug report I don't see -Xmx or -Xms arguments being used. Also, it could take some time for the java process memory utilization to stabilize. Even after it stabilizes there is some fluctuation when full GC's occur. For the sake of minimizing some of these issues, try running tomcat with -Xmx250m -Xms250m so that all of the java heap is allocated upfront and then look for increasing java process memory usage after things stabilize. > > Could it be a memory leak ? Or is this increase normal because it > contains cached memory which can be freed when nescessary ? I'm not sure yet if you've found a leak or not. > And where could I see the diagnostic message for the malloc() function ? The man page for malloc() says it goes to stderr. Regards, -Kurt