In a smaller web application I added two timeseries charts using CeWolf 1.1 and JFreeChart 1.0.13. When we deployed the application, it ran for an hour, then started reporting lots of OutOfMemoryError.
I'm convinced that the problem has to do with the fact that our
JSP page automatically refreshes every 5 seconds, which causes the charts to be redrawn. The charts themselves only change once every 5 minutes, but there is information in the page that we need to update within 5 seconds when it changes. I know that the long term solution i AJAX, we will come around to that later this summer.
Still, I had not expected this behaviour, and we would like our application to run 24*7, which it did nicely before. Does anyone know of a memory leak in either CeWolf or JFreeChart? Maybe even of a way to circumvent it? I just wanted to ask before I acquire a profiler.
Our application runs in a
Tomcat server. There are 12 data points in each plot. I use two chart postprocessors for each chart, one de.laures.cewolf.cpp.TitleEnhancer and a homegrown one that fixes the range of the y scale (range scale) to be from 0 to 0.25 regardless of the data. For the time being, we have very few users, say 2 or 3, but that is expected to grow.
Any hints appreciated.