Hello Footh,
footh pisze:
I've been trying to track down a memory problem with
my Cocoon application for a long time now. After a
period of time, maybe a week or two, the application
would die with an OutOfMemory error. I've tried
increasing the VM memory for the servlet container
(using Tomcat 5.5) and switching to the JRockIt VM
(delayed the OOM error, but still got it). Nothing
seemed to work. Finally, I put my app through a
series of tests to narrow down the culprit.
After stripping layer upon layer of functionality, I
finally discovered that Javaflow seems to be the
problem. I started with a bare-bones site and drilled
it with a load tester. The Tomcat memory use would
remain stable. I added more features and still no
problem. Then, I threw in the Javaflow, and the
memory skyrocketed. To make sure it wasn't something
I was doing in the Javaflow, I created the simplest
flow possible - a one-line "sendPage(uri)" call.
Still the memory would blow up.
As a final test, to make sure it wasn't something I
was doing wrong, I ran the test on the sample Javaflow
application that comes with Cocoon. I used the
calculator sample and just hit the first page. Once
again, the memory kept rising. If I took that page
off the test, there were no memory issues.
My next step was to profile the memory use to see if I
could find out where the memory was being allocated.
It turns out that byte array data comprised the
majority of the allocated memory. After running a test
for 20 minutes or so, the Tomcat memory use was around
1GB with byte array data responsible for 82% of the
total.
Now, I realize that Javaflow is considered an unstable
block. I'm wondering if anyone else using this
feature has had similar problems? Any idea why this
might be occurring with Javaflow? Does flowscript
have similar problems?
I now need to reconsider the MVC architecture of my
application which has been in production for several
years. I do a lot of stuff in the Javaflow. I'm open
to any suggestions!
I don't much details about javaflow internals but basic questions come to my
mind:
1. Have you checked what bit of code creates these byte arrays?
2. What's stored in them?
I suggest to create an issue in JIRA and provide answers to these basic questions so devs can have a
look and help you. If I was you I would investigate further a little bit before dropping Javaflow
because it may turn out to be really simple problem...
--
Grzegorz Kossakowski
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]