Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 906249E72 for ; Tue, 13 Mar 2012 19:19:49 +0000 (UTC) Received: (qmail 9630 invoked by uid 500); 13 Mar 2012 19:19:49 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 9567 invoked by uid 500); 13 Mar 2012 19:19:49 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 9559 invoked by uid 99); 13 Mar 2012 19:19:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Mar 2012 19:19:49 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mkienenb@gmail.com designates 74.125.82.171 as permitted sender) Received: from [74.125.82.171] (HELO mail-we0-f171.google.com) (74.125.82.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Mar 2012 19:19:42 +0000 Received: by werm1 with SMTP id m1so1550300wer.16 for ; Tue, 13 Mar 2012 12:19:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=PKdlkNpksSj1lzR2IN2GHUNx/Ls05Vz1r7WSOEQYeZs=; b=bd22rYa5PRb3zeJlwxGiAI1EMSWvGssmB+JH7iUT+bnJ1lNEBKU82foqRY7CKdMxC7 MPBIAKcPpdZl8l1w772PsRcP2x/KEyQx81IQZ6PkU+sm4BudAESe4TgeY1G5eMX9hozt 7nHRPGHoJpnfBP9e1D1ljRMYEggGUnXRPrKYQ6fiN+FelC6OYJMcq4Shl1ZpTwok1g6p /y6xRJYg4ZiRnnNwWXuWIBOjr4u5uL+gPIVnTSSP0IVBS3v0NGoSPK1WHpL/ZtNOEdJP rSUgbbTVX65eBhzAstfPVfyWLKSZL4pbBhglIqvXxhFpXvjH2Fft8BlgepnAb5eLdpLY O/Gg== Received: by 10.216.131.206 with SMTP id m56mr9779245wei.92.1331666362201; Tue, 13 Mar 2012 12:19:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.8.68 with HTTP; Tue, 13 Mar 2012 12:19:01 -0700 (PDT) In-Reply-To: <8CB6B941-D04C-4F90-9416-6E410139C9D1@earthlink.net> References: <8CB6B941-D04C-4F90-9416-6E410139C9D1@earthlink.net> From: Mike Kienenberger Date: Tue, 13 Mar 2012 15:19:01 -0400 Message-ID: Subject: Re: Memory Usage Problem with Tomcat To: user@cayenne.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org If you have almost no activity, why not set up a duplicate environment running the same version of Tomcat and hit your application using JMeter or some other testing tool? Or perhaps you can get sent the application http access.log file and duplicate the exact series of requests that generated the problem in your dev environment. That said, Tomcat did often seem to have intrinsic memory issues, which is another reason I stopped using a few years back. Also, you might want to ask what the exact stacktrace is. We've had situations where it was a Tomcat permgen memory issue. See this article for details -- there are more details in the comments by others: http://www.mkyong.com/tomcat/tomcat-javalangoutofmemoryerror-permgen-space/ Again, a disclaimer as I haven't used Tomcat personally in a while, although some of my colleagues continue to do so for development. And we don't run app servers using it. On Tue, Mar 13, 2012 at 2:59 PM, Joe Baldwin wrot= e: > OK, I think that I may have run into this before. =A0The ultimate "soluti= on" was to increase memory - however, I am concerned that may have been a q= uick-fix and not a long-term fix. > > The problem is out of memory errors associated with tomcat heap. > > I have a webapp (powered primarily by cayenne). =A0The database has *very= * little in it. =A0I am essentially serving data (via cayenne & tomcat) and= images (via tomcat). > > I have a private tomcat instance running on a webhost in a "shared" envir= onment. =A0What this means is that I *absolutely* cannot attach a profiler. > > I am being told by the webhost IT people (who are not always accurate in = their objectivity) that my app is leaking memory (badly), and that is what = caused tomcat to crash. > > My intuition tells me that with almost no activity on the website (becaus= e it is not live yet) and Cayenne memory management that I should be able t= o manage memory well, but it is not the case. > > So, if my goal is to determine what the problem is, and if I simply incre= ase heap size, won't I just be masking a potential problem? =A0i.e. if the = app runs fine for a while, then mysteriously causes tomcat to run out of he= ap space, then couldn't there be a memory leak? > > If there is a memory leak, and I don't see it on my development server, a= nd I *can't* use a profiler on my webhost, then how do I get visibility int= o the memory usage? > > Thanks > Joe >