cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Baldwin <>
Subject Memory Management Practices
Date Thu, 13 Aug 2009 16:22:57 GMT

I have been attempting to do as much performance tuning as I can given  
the visibility of the middleware I am using, but am running into  
severe "out of memory" errors with Tomcat on my production server.  My  
current theory is that I may have missed something concerning how to  
properly maintain my Cayenne data objects.

1. I am using the most recent version of Cayenne.
2. This is primarily a web app, using JSP, Tomcat, Cayenne and MySQL
3. Tested both on OSX and Linux
4. Essentially, it is a webstore with a lot of products
	- small amount of UPDATES
	- very large amount of searches resulting in result sets that will  
average between 50-500 products for read-only
	- occasional large result sets of a few thousand products for read-only
5. The design is a simple 3-tier.

After a few hours to a few days of what appears to be very light  
usage, Tomcat reports "out of memory" errors.  Since the vast majority  
of the tasks performed by the app are funneled through Cayenne, I am  
assuming that is where I am making the mistake.

What is the best way to manage the data objects in this  
configuration?   (i.e. caching, releasing memory, etc)

I was researching the Java Library ArrayList (which I believe is the  
work-horse for the Cayenne result sets), and there are many  
recommendations concerning custom clearing of the list and releasing  
memory.   Is this possibly where I am may have missed something?


View raw message