Re: Memory Management using Tomcat

From: Michael Gentry (mgentr..asslight.net)
Date: Wed Sep 16 2009 - 14:39:39 EDT

  • Next message: Michael Gentry: "Re: Memory Management using Tomcat"

    My biggest Cayenne-based application (to-date) was using Cayenne 2.x.
    I started on Tomcat, but then switched to Jetty for development. I
    didn't have any problems with either, nor when I deployed into
    WebLogic. I was reading 10,000+ active/cached records from the
    database, too, which sounds like many more than you are using. What
    web framework are you using? Also, make sure you have enough memory
    allocated to Tomcat. You could have too small of a maximum memory
    amount allocated to Tomcat.

    mrg

    On Wed, Sep 16, 2009 at 2:11 PM, Joe Baldwin <jfbaldwi..arthlink.net> wrote:
    > Hi,
    >
    > I have asked this question a number of ways but I still have a very serious
    > problem with Cayenne-specific memory management configuration associated
    > with Tomcat.
    >
    > The problem with debugging is that given that I have very little visibility
    > into the Cayenne memory management it is extremely difficult to debug this
    > using conventional strategies.  Also I am not requesting anything from the
    > system that is terribly exceptional so I am attempting to use default
    > settings as much as possible.
    >
    > My strategy is to ask the experts for a Cayenne configuration and standard
    > memory management steps I should take to conform to the new Cayenne memory
    > management design intentions.
    >
    > Problem:
    > 1. I have essentially a webstore, three tier design with Tomcat, Cayenne and
    > MySQL.
    > 2. When after only a few queries of products, tomcat freezes up and reports
    > out of memory errors.
    >
    > I have attempted to configure the caching strategy ask best as I can
    > understand from the docks but this only gets me a few more hours of usage
    > before the out of memory errors.  (I tried the SHARED_CACHE). The NO_CACHE
    > strategy is worse.
    >
    > I would appreciate a set of steps (aka a primer) that should handle a
    > website with a lot of fetches of hundreds of data objects (i.e. products)
    > and very few updates.
    >
    > Note: My gut feeling is that I am not properly managing the data object
    > array properly and it is leaking memory.
    >
    > I would appreciate any input, but I would first like to know what the
    > minimum require steps are for managing at data object result set ArrayList
    > so as to properly cache and then properly free the memory after it is no
    > longer needed.
    >
    > Context: Tomcat, MySQL, Cayenne 3.0M6
    >
    > Thanks,
    > Joe Baldwin
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Sep 16 2009 - 14:40:13 EDT