You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Marek Wawrzyczny <ma...@internode.on.net> on 2006/05/21 16:33:23 UTC

Cayenne 3T - Swing GUI - high memory usage

Hi,

We still have not been able to resolve high memory usage with our multi-tier 
cayenne client. Timing out the Http sessions made no difference.

Can someone give me some pointers as to the mechanism that binds a servlet 
session to the corresponding object context on the server? Which classes do I 
need to look into.

Also, how do the editing contexts initiated by the client, shared and peer, 
time out on the server? They don't seem to be tied to the Http session.

Finally, has anyone tried using an embedded Jetty (www.mortbay.com) server 
with the cayenne servlet? If not, has anyone attempted using the embedded 
Tomcat server?


Regards,

Marek Wawrzyczny

Re: Cayenne 3T - Swing GUI - high memory usage

Posted by Andrus Adamchik <an...@objectstyle.org>.
I just did some memory profiling. I started jetty server (5.1.3)  
running Cayenne service, and sent a constant stream of client  
requests, each one inserting 500 new objects. Once an equilibrium was  
reached between session termination and session creation, the heap  
memory peaked and would not grow further. Then I stopped the client  
requests and all remaining sessions were eventually terminated. At  
this point the heap memory dropped back to a very low value (~ 2.4 Mb).

So I am fairly certain that the service doesn't leak. You can email  
me privately if you need help with your app - there has to be  
something app-specific.

Ok, I am going offline for tonight...

Andrus


On May 21, 2006, at 11:47 PM, Andrus Adamchik wrote:

> I don't embed it in an application per se, but I would imagine  
> there is no difference in a general case (when the rest of your app  
> doesn't maintain references to the things inside web app context).
>
> Andrus
>
> On May 21, 2006, at 11:29 PM, Marcin Skladaniec wrote:
>
>>
>> Andrus are you testing on embedded jetty ? We are, and I start to  
>> think that it might be it causing the problem.
>>
>> Marcin
>>
>> On 22/05/2006, at 1:11 PM, Andrus Adamchik wrote:
>>
>>>
>>> On May 21, 2006, at 10:59 PM, Marek Wawrzyczny wrote:
>>>
>>>> Thanks, we do have a much simpler test application that  
>>>> experiences the same
>>>> behaviour.Coincidently, which version of Jetty are you using?
>>>
>>> I've done most of the testing with Jetty 5.1.3. A few days ago I  
>>> switched to 6.0 Beta (as it has a nifty Maven plugin that starts  
>>> your container with all dependencies from pom) - don't have much  
>>> data for 6.0 yet.
>>>
>>> Andrus
>>
>>
>
>


Re: Cayenne 3T - Swing GUI - high memory usage

Posted by Andrus Adamchik <an...@objectstyle.org>.
I don't embed it in an application per se, but I would imagine there  
is no difference in a general case (when the rest of your app doesn't  
maintain references to the things inside web app context).

Andrus

On May 21, 2006, at 11:29 PM, Marcin Skladaniec wrote:

>
> Andrus are you testing on embedded jetty ? We are, and I start to  
> think that it might be it causing the problem.
>
> Marcin
>
> On 22/05/2006, at 1:11 PM, Andrus Adamchik wrote:
>
>>
>> On May 21, 2006, at 10:59 PM, Marek Wawrzyczny wrote:
>>
>>> Thanks, we do have a much simpler test application that  
>>> experiences the same
>>> behaviour.Coincidently, which version of Jetty are you using?
>>
>> I've done most of the testing with Jetty 5.1.3. A few days ago I  
>> switched to 6.0 Beta (as it has a nifty Maven plugin that starts  
>> your container with all dependencies from pom) - don't have much  
>> data for 6.0 yet.
>>
>> Andrus
>
>


Re: Cayenne 3T - Swing GUI - high memory usage

Posted by Marcin Skladaniec <po...@gmail.com>.
Andrus are you testing on embedded jetty ? We are, and I start to  
think that it might be it causing the problem.

Marcin

On 22/05/2006, at 1:11 PM, Andrus Adamchik wrote:

>
> On May 21, 2006, at 10:59 PM, Marek Wawrzyczny wrote:
>
>> Thanks, we do have a much simpler test application that  
>> experiences the same
>> behaviour.Coincidently, which version of Jetty are you using?
>
> I've done most of the testing with Jetty 5.1.3. A few days ago I  
> switched to 6.0 Beta (as it has a nifty Maven plugin that starts  
> your container with all dependencies from pom) - don't have much  
> data for 6.0 yet.
>
> Andrus


Re: Cayenne 3T - Swing GUI - high memory usage

Posted by Andrus Adamchik <an...@objectstyle.org>.
On May 21, 2006, at 10:59 PM, Marek Wawrzyczny wrote:

> Thanks, we do have a much simpler test application that experiences  
> the same
> behaviour.Coincidently, which version of Jetty are you using?

I've done most of the testing with Jetty 5.1.3. A few days ago I  
switched to 6.0 Beta (as it has a nifty Maven plugin that starts your  
container with all dependencies from pom) - don't have much data for  
6.0 yet.

Andrus

Re: Cayenne 3T - Swing GUI - high memory usage

Posted by Marek Wawrzyczny <ma...@internode.on.net>.
Hi Andrus,

Thanks, we do have a much simpler test application that experiences the same 
behaviour.Coincidently, which version of Jetty are you using?

I will pass on the offer to the team, it's my day off today...

Marek

On Monday 22 May 2006 03:34, Andrus Adamchik wrote:
> Marek,
>
> I can't give you general pointers, I guess I'll need to poke around
> myself to doublecheck that things work on Cayenne end (I am also
> using Jetty for testing). Will put it on my TODO list for next week.
>
> If no problems are found on Cayenne end, if you wish I can take a
> look at your application - we can work out some reasonable support fee.
>
> Andrus
>
> On May 21, 2006, at 10:33 AM, Marek Wawrzyczny wrote:
> > Hi,
> >
> > We still have not been able to resolve high memory usage with our
> > multi-tier
> > cayenne client. Timing out the Http sessions made no difference.
> >
> > Can someone give me some pointers as to the mechanism that binds a
> > servlet
> > session to the corresponding object context on the server? Which
> > classes do I
> > need to look into.
> >
> > Also, how do the editing contexts initiated by the client, shared
> > and peer,
> > time out on the server? They don't seem to be tied to the Http
> > session.
> >
> > Finally, has anyone tried using an embedded Jetty (www.mortbay.com)
> > server
> > with the cayenne servlet? If not, has anyone attempted using the
> > embedded
> > Tomcat server?
> >
> >
> > Regards,
> >
> > Marek Wawrzyczny

-- 
-
Marek W

--
2b | !2b

Re: Cayenne 3T - Swing GUI - high memory usage

Posted by Andrus Adamchik <an...@objectstyle.org>.
Marek,

I can't give you general pointers, I guess I'll need to poke around  
myself to doublecheck that things work on Cayenne end (I am also  
using Jetty for testing). Will put it on my TODO list for next week.

If no problems are found on Cayenne end, if you wish I can take a  
look at your application - we can work out some reasonable support fee.

Andrus


On May 21, 2006, at 10:33 AM, Marek Wawrzyczny wrote:
> Hi,
>
> We still have not been able to resolve high memory usage with our  
> multi-tier
> cayenne client. Timing out the Http sessions made no difference.
>
> Can someone give me some pointers as to the mechanism that binds a  
> servlet
> session to the corresponding object context on the server? Which  
> classes do I
> need to look into.
>
> Also, how do the editing contexts initiated by the client, shared  
> and peer,
> time out on the server? They don't seem to be tied to the Http  
> session.
>
> Finally, has anyone tried using an embedded Jetty (www.mortbay.com)  
> server
> with the cayenne servlet? If not, has anyone attempted using the  
> embedded
> Tomcat server?
>
>
> Regards,
>
> Marek Wawrzyczny
>