From owner-freebsd-java@FreeBSD.ORG Mon Feb 11 15:26:30 2008 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C146316A41B for ; Mon, 11 Feb 2008 15:26:30 +0000 (UTC) (envelope-from tomasv@megalogika.lt) Received: from megalogika.stp.lt (megalogika.stp.lt [193.219.52.197]) by mx1.freebsd.org (Postfix) with ESMTP id 748E613C4DD for ; Mon, 11 Feb 2008 15:26:30 +0000 (UTC) (envelope-from tomasv@megalogika.lt) Received: from pilvas.lan (pilvas.lan [192.169.1.86]) by megalogika.stp.lt (Postfix) with ESMTP id 255FF1CCC7; Mon, 11 Feb 2008 17:09:51 +0200 (EET) Received: by pilvas.lan (Postfix, from userid 1001) id F05F340D3; Mon, 11 Feb 2008 17:09:56 +0200 (EET) Date: Mon, 11 Feb 2008 17:09:56 +0200 From: Tomas Verbaitis To: bug-followup@FreeBSD.org, white@gang.synchbox.com Message-ID: <20080211150956.GA89514@megalogika.lt> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline X-URL: http://blog.hardcore.lt/ve/ X-PGP-Key: http://hardcore.lt/ve/pubkey.txt X-PGP-Key-Fingerprint: E8FB 7C13 99D9 ABDE 0494 B9F6 4D9C F010 881D 3A26 X-nic-hdl: TV13-LT User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-java@freebsd.org Subject: Re: java/114644: tomcat goes out of PermSpace, jvm crashes X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: tomasv@megalogika.lt List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2008 15:26:30 -0000 --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > Hi, does anyone know whether anyone is working/looking at this issue? > Apparantly it has been open since July 17th, 2007. I looked on > http://lists.freebsd.org/pipermail/freebsd-java/2007-July/006476.html > and 'State' is on 'open'. Thanks for reminding about this issue. Problems with PermGen space are quite common for all contemporary Java applications, just google around for the "tomcat PermGen" and see... AFAIU the key is that by default Java allocates too little memory for object that are kept around permanently and not garbage collected. There is a workaround for this issue: specifying more memory. With Java 1.5 and 1.6 the following switches work good (for Eclipse; although my development Tomcat server, which has contexts reloaded often, crashes when running out of PermGen space, production machines have Tomcat 5.0 and 5.5 running for months without this problem): -XX:PermSize=3D128M -XX:MaxPermSize=3D512M The first option specifies starting PermGen space size, the second -- how big can it grow. Exact values depend on your application's object creation patterns. You should put these options into rc.conf variable tomcat55_java_opts. As Tomcat 5.5 port maintainer, I guess I could a pkg-mesg with the above information, at least. Specifying some default tomcat55_java_opts values seems a bit unreasonable, as -XX Java VM options may disappear without notice. --=20 Tomas "Verbaitis" Verbaitis ** http://megalogika.lt --uAKRQypu60I7Lcqm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHsGVETZzwEIgdOiYRAkICAJ4xDn5Z+aNQld/E0U21rxjxSjax6ACgq2aF vEJilgSbu0zkulbrU/7mwrc= =FDJL -----END PGP SIGNATURE----- --uAKRQypu60I7Lcqm--