From owner-freebsd-ports@FreeBSD.ORG Tue Jan 3 14:02:24 2012 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DED66106566C for ; Tue, 3 Jan 2012 14:02:24 +0000 (UTC) (envelope-from kayasaman@gmail.com) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7678C8FC13 for ; Tue, 3 Jan 2012 14:02:24 +0000 (UTC) Received: by wibhr1 with SMTP id hr1so15972676wib.13 for ; Tue, 03 Jan 2012 06:02:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=2hB3mrIIJ+h78Oc+Z9qolCRCrcdbY1y4pdJ0kUvZRj8=; b=Gecdh+gtxwn2DLT9USL2Dvp1oubUdH4Vga64baQFzQN9lCzdG90pwLMZpHGp/9nOX7 VPHXROfnZZozSHL8kUw/hkfyu/yB2NsnV7w8TI91WxfeRWOzU+Qbq9hgZFyNEtlgpb6Q QwllCiNcVSPB2Gvq/iZLyJs7wpuBDq8BAU8M4= Received: by 10.180.83.69 with SMTP id o5mr114486654wiy.1.1325597671095; Tue, 03 Jan 2012 05:34:31 -0800 (PST) Received: from Hp2230s.localhost (81-178-2-118.dsl.pipex.com. [81.178.2.118]) by mx.google.com with ESMTPS id f36sm11305789wbo.10.2012.01.03.05.34.29 (version=SSLv3 cipher=OTHER); Tue, 03 Jan 2012 05:34:29 -0800 (PST) Message-ID: <4F0303DE.5030101@gmail.com> Date: Tue, 03 Jan 2012 15:34:22 +0200 From: Kaya Saman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: ports@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Java Heap Space out of memory error Tomcat6 port X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2012 14:02:24 -0000 Hi, I'm running FreeBSD 8.2 x64 edition with 4GB RAM on a quad core machine. I keep getting this error: umbers=0&rev=11.1" java.lang.OutOfMemoryError: Java heap space Exception in thread "http-8180-Acceptor-0" java.lang.OutOfMemoryError: Java heap space and essentially due to it my webapp will simply die and not work - which is actually xwiki. In order to rectify the situation with the help of some Google'ing I added this to my Catalina.sh file: JAVA_OPTS=-Xmx1024m JAVA_OPTS=-Xms1024m #JAVA_OPTS=-XX:PermSize=64M #JAVA_OPTS=-XX:MaxPermSize=256m However, as I found out early this morning, it didn't work I had the same issue. I have asked on the xwiki mailing list for any advice but it seems the guys there are all Linux users and can't really help me out much although they suggested to use: CATALINA_OPTS instead of JAVA_OPTS. I have tried that and although it's still too early to tell what is going on since the last restart was only a few hours ago but I thought I'd just quickly ask here and see what could be done as CATALINA_OPTS and JAVA_OPTS seem to be more or less the same with JAVA_OPTS also being used at Tomcat stop as well as start. The odd thing is that I have tested the same webapp and DB combo on a PowerMac G4 running PPC edition of Fedora 11 which on a 733MHz machine with 384MB RAM did work fine for over a week if not a little slow. I also tested on Nexenta Core 3 (OpenSolaris) running Glassfishv3 on a VM inside my notebook with 2GB dedicated RAM and that was up for several months even though really slow again - a while back. Can anyone help me with figuring this out?? I mean I'm not even using swap space on my machine so it definitely has not run out of memory. It seems a Java option somewhere but I have no idea where or what. Thanks, Kaya