Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2B18F10565 for ; Fri, 12 Apr 2013 02:03:06 +0000 (UTC) Received: (qmail 4605 invoked by uid 500); 12 Apr 2013 02:03:02 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 4394 invoked by uid 500); 12 Apr 2013 02:03:02 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 4385 invoked by uid 99); 12 Apr 2013 02:03:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Apr 2013 02:03:02 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of smithh032772@gmail.com designates 209.85.215.42 as permitted sender) Received: from [209.85.215.42] (HELO mail-la0-f42.google.com) (209.85.215.42) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Apr 2013 02:02:56 +0000 Received: by mail-la0-f42.google.com with SMTP id fn20so1786217lab.29 for ; Thu, 11 Apr 2013 19:02:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=PZY3WeMg/LBA7p6jk/6rF6ONUTb2VJAWvvNGs9ySwr4=; b=jOjm79YL4PBY08lw0Wozkhs1Lwk6taFWOwPDqm/+dq4GcEPwMrtbfbfRplmG+ArJnn m0ErMvNIWHJbfQNPBZuu9BCNoXRgTnaQuOnEqjKzuPrHn6cFLqaBC1UDD51IKVVMe0ay Fgnpn+rOEP+va2RAH1TK1D5WBPaeRfOmTZ6pm4gGw3BJPyhzvQUT+9U9EscAGvkbsgAs HQh2lEvy+knXeqEljrwWDBsmsNG2IkJ61wPh+wP7tE5aIPkVpAPibjzAroEp7G9AGPIt rhEF2hLO4ZMhqepiDTqmg8iBODyIK6OtSy7cgTmw7N/RSyiueCAxIFoIrpx0+kFluHs5 4rew== MIME-Version: 1.0 X-Received: by 10.152.87.142 with SMTP id ay14mr4424619lab.24.1365732156111; Thu, 11 Apr 2013 19:02:36 -0700 (PDT) Received: by 10.112.34.34 with HTTP; Thu, 11 Apr 2013 19:02:35 -0700 (PDT) In-Reply-To: References: Date: Thu, 11 Apr 2013 22:02:35 -0400 Message-ID: Subject: Re: RE : Tomcat 6.0.35 Crashed again From: "Howard W. Smith, Jr." To: Tomcat Users List Content-Type: multipart/alternative; boundary=001a11c3560c0601d604da204ca1 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c3560c0601d604da204ca1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Apr 11, 2013 at 8:02 PM, Martin Gainty wrote: > you need to do take a look at the loaded JSF webapps and find outwho is > acquiring a resource and not closing the resource > who is acquiring large amounts of heap and not releasingbe aware any > reference to an any object in another class gives the class the right to = be > placed into PermGenHibernate with cglib proxies are notorious memory hogs > awatch your PermGen get pegged when Hibernate and cglib proxies are > loadedStatics are another set of culprits of of heap usage > Remember all long lived heap objects are eventually placed into Permgen > Find the tools to track eden heap, tenured heap and PermGen > > http://www.integratingstuff.com/2011/07/24/understanding-and-avoiding-the= -java-permgen-space-error/get familiar with taking heap dumps with jmap and= analyzing with jhathttp:// > javarevisited.blogspot.com/2011/05/java-heap-space-memory-size-jvm.htmlMa= rtin > > Interesting. Thanks! > ______________________________________________ > Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de confidentialit= =E9 > > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene > Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugt= e > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht > dient lediglich dem Austausch von Informationen und entfaltet keine > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. > Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAt= es pas le > destinataire pr=E9vu, nous te demandons avec bont=E9 que pour satisfaire > informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e ou la= copie > de ceci est interdite. Ce message sert =E0 l'information seulement et n'a= ura > pas n'importe quel effet l=E9galement obligatoire. =C9tant donn=E9 que le= s email > peuvent facilement =EAtre sujets =E0 la manipulation, nous ne pouvons acc= epter > aucune responsabilit=E9 pour le contenu fourni. > > > Date: Thu, 11 Apr 2013 11:40:46 -0400 > > Subject: Re: RE : Tomcat 6.0.35 Crashed again > > From: smithh032772@gmail.com > > To: users@tomcat.apache.org > > > > On Thu, Apr 11, 2013 at 10:41 AM, Mark H. Wood wrote: > > > > > Really, no one else can tell you what settings to use. The best we > > > can hope for is some accepted rules of thumb *as starting points* for > > > further tuning. > > > > > > > > +1 to Dan, Neven, and Mark's responses. Please consider-or-do > 'everything' > > that they mentioned/recommended. > > > > I did want to share my java settings for my > > currently-considered-a-low-scale JSF web app running on Windows Server > 2008 > > R2 64bit server with 32GB RAM. > > > > -XX:HeapDumpPath=3DD:\apache-tomee-plus-1.6.0-SNAPSHOT\temp > > -XX:+HeapDumpOnOutOfMemoryError > > -Djava.awt.headless=3Dtrue > > -Dcom.sun.management.jmxremote.port=3D422 > > -Dcom.sun.management.jmxremote.ssl=3Dfalse > > -Dcom.sun.management.jmxremote.authenticate=3Dfalse > > -Xms1024m > > -Xmx1024m > > -XX:MaxPermSize=3D384m > > -XX:+UseTLAB > > -XX:+UseConcMarkSweepGC > > -XX:+CMSClassUnloadingEnabled > > > > I am very pleased with the GC performance of my app, and I do like to > > monitor the performance of the app via JMX remote connection via Java > > Visual VM. My app runs between 200m to 500m, but I am keeping > Xms/Xmx=3D1024m > > just to see if I ever get an OOME; so far, so good (never experienced a= n > > OOME), but recently, I did experience some unexpected/unwanted behavior > > with one of my @Schedule processes which was attempting to sync some da= ta > > from database to/with Google Calendar, and google Calendar service > returned > > google calendar error 503, and I recognized that the memory got up to > 500m, > > and the google calendar error 503 did not resolve itself over an hour > > (@Schedule executes every 2 to 4 minutes, if error occurs, then data is > > appended to the queue for later retry attempt). I never seen that > behavior > > and I don't know if I will see it again; i wish I would have done a 'he= ap > > dump' instead of a 'stop' tomee/tomcat. Everyday, I listen and read the= se > > questions/responses on tomcat list, and I can't believe that I forgot t= o > do > > a 'heap dump'. :( > > > > Also, please note that I occasionally stop-deploy-and-start tomee/tomca= t > > almost-on-a-daily-basis to deploy new app-or-configuration-or-library > > updates; also, the app or tomee (or tomcat) seem to accumlate > threadlocals > > over time, and if uptime is > 1 day, then I 'think' I see that memory i= s > > not released, and I think eventually as uptime increases, then the > > app/tomee/tomcat will result in OOME. :) > > > > At any rate, hope this helps. > > > > Howard > > --001a11c3560c0601d604da204ca1--