Hi Andrus,
We tried your suggestion but setting session timeout does not help,
we still see a steady increase in memory allocation with every
request/response.
We are currently trying to setup our test project in a non-embedded
mode. I have a suspicion that the memory leak is caused by us using
an embedded Jetty server. We need to find out what is causing this
memory leak because it is absolutely essential for us to have a
completely embedded, self-sustainable server.
Out of curiosity, I have noticed that there is only one instance of
the servlet created for all requests/responses. This one instance is
responsible for all communication between the server and clients for
the life of the server. Previous memory leak reports for Jetty point
to Loggers not being released at the correct points, but I have been
going through the source for both Hassian and Cayenne and have found
no evidence of any Loggers even existing in the code.
Any ideas what else could be grabbing the memory and how to debug
this one, preferably when running Jetty in embedded mode?
Regards,
Marek Wawrzyczny
On 05/05/2006, at 1:29 AM, Andrus Adamchik wrote:
> I suspect your sessions are not timing out. As SF anonymous CVS
> seems to be dead for good, I just moved the example code to Apache
> subversion [1]. There is a sample listener class,
> cayenne3t.example.util.SessionTracker, that debugs session
> deallocation. Timeout is controlled in web.xml via standard means:
>
> <session-config>
> <session-timeout>10</session-timeout>
> </session-config>
>
> [1] http://svn.apache.org/repos/asf/incubator/cayenne/examples/trunk/
>
> Andrus
>
> On May 4, 2006, at 3:59 AM, Marek Wawrzyczny wrote:
>
>> Hi all,
>>
>> We are getting close to releasing a preview version of our
>> software that utilizes Multi-tier Cayenne.
>> We have started to stress test it and we have hit a problem,
>> something on the server us consuming
>> memory and never releases it.
>> I tried profiling the server application and it appears that
>> RawData objects (our first hunch) on the
>> server are being GC'ed correctly. There is no indication of
>> excessive instances of any class, Cayenne
>> or not.
>>
>> The one thing not being monitored by the profiler is servlets.
>> Judging by the memory usage jumps,
>> I have a sneaking suspicion that it is the HessianServlet
>> responses that are not being GC'ed - the
>> increases seem to correspond to data requests.
>>
>> The particular piece of GUI tested fetches a list of ~25,000
>> records from a table into a shared context with
>> paging enabled, page size is 100 records.
>> The used memory in the JVM jumps by 30+ Mb as we traverse through
>> all the records. The JVM never
>> releases that memory.
>>
>> We have been through our code and we are definitely not keeping
>> any references to instances of
>> servlets, requests or responses.
>>
>> We are using Jetty as the server.
>>
>> I was hoping someone might have some pointers before I jump into
>> writing a profiling container for
>> the servlet. Any help appreciated.
>>
>>
>> Regards,
>>
>> Marek Wawrzyczny
>>
>
This archive was generated by hypermail 2.0.0 : Mon May 15 2006 - 22:45:26 EDT