commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hans Gilde" <hgilde-comm...@earthlink.net>
Subject RE: [Jelly] compiling scripts causes memory leaks
Date Thu, 16 Sep 2004 23:22:33 GMT
The actual thread local objects are supposed to be available for GC when the
ThreadLocal object that keeps them is available for GC. So, this really
shouldn't be a problem unless one keeps many copies of the Script instances
around.

Also, if it's just one Tag instance per thread, it shouldn't be a problem
with load. Each thread should fill up once and that's it. One wouldn't
usually all that many threads for a Tomcat connector.

However, I have JProbe, so I will investigate now.

-----Original Message-----
From: Kristofer Eriksson [mailto:Kristofer.Eriksson@techmar.de] 
Sent: Thursday, September 16, 2004 6:06 PM
To: Jakarta Commons Users List
Subject: RE: [Jelly] compiling scripts causes memory leaks

Hi Paul

Must be this you mean?

---
Jelly uses ThreadLocal variables inside TagScript objects in order to enable
thread safety. Unfortunately, in an environment that performs thread
pooling, this means that much of the memory used by Jelly is never eligable
for garbage collection. If you pool enough threads, this can lead to
out-of-memory errors. 

One workaround is for the end-user to always launch Jelly scripts in their
own threads. However, this is not ideal. Jelly should be modified so that it
handles memory efficiently when used inside of a thread pool.
---

Seems like this is still somehow an issue. And to my understanding, the
Jetspeed portal is using thread pooling (pls correct me if wrong) so that
might be a reason. 

But a solution, hmmm, still far away I guess. Anyone else, ideas?

Thx

/Kristofer


-----Original Message-----
From: Paul Libbrecht [mailto:paul@activemath.org] 
Sent: Thursday, September 16, 2004 10:42 PM
To: Jakarta Commons Users List
Subject: Re: [Jelly] compiling scripts causes memory leaks

Kristofer,

There was a leak-issue filed in Jira, I think it was kind of closed... 
it had to do with re-used threads.

paul


Le 16 sept. 04, à 18:22, Kristofer Eriksson a écrit :

> Hi all,
>
>
>
> am a big fan of Jelly and am happy to see the progress with the latest 
> beta
> 4 release. Congratulations all of you involved.
>
>
>
> I am using it now (heavily) in a portal dev project (Jetspeed) and 
> having
> problems with performance and "memory leaks". My tests have shown that 
> when
> using real time compilation of scripts the memory used by tomcat is 
> growing
> rapidly under load. I have compared real time compilation and pre 
> compiled
> scripts and there is definitively a big difference.
>
>
>
> Is this something known, have someone experienced the same, and most
> important: can it be prevented? I suppose it could have to do with the 
> xml
> parser used, and not jelly itself, but my knowledge there is not on an
> expert level.
>
>
>
> Within the app, I am using dynamic scripts so I cannot pre-compile
> everything, so that suggestion will not give me much help:-)
>
>
>
> Pls, any help/info appreciated.
>
>
>
> Kind Regards
>
>
>
> /Kristofer Eriksson
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message