From owner-freebsd-java@FreeBSD.ORG Mon Feb 11 15:10:05 2008 Return-Path: Delivered-To: freebsd-java@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5FEB16A4EF for ; Mon, 11 Feb 2008 15:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D58FA13C45E for ; Mon, 11 Feb 2008 15:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m1BFA5xY033039 for ; Mon, 11 Feb 2008 15:10:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m1BFA5j9033036; Mon, 11 Feb 2008 15:10:05 GMT (envelope-from gnats) Date: Mon, 11 Feb 2008 15:10:05 GMT Message-Id: <200802111510.m1BFA5j9033036@freefall.freebsd.org> To: freebsd-java@FreeBSD.org From: Tomas Verbaitis Cc: 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: Tomas Verbaitis 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:10:06 -0000 The following reply was made to PR java/114644; it has been noted by GNATS. From: Tomas Verbaitis To: bug-followup@FreeBSD.org, white@gang.synchbox.com Cc: freebsd-java@freebsd.org Subject: Re: java/114644: tomcat goes out of PermSpace, jvm crashes Date: Mon, 11 Feb 2008 17:09:56 +0200 --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--