Yarick, can you open a defect in bugzilla and attach the patch, once we have a few more developers look at it,
we can apply it,

also let us know if you'd be interested in working with the group to come up with a per context configurable cache mechanism

Filip


Yaroslav Sokolov wrote:
Actually I found this strings-problem as well. I even created a patch to
test how it affects on memory filling.

The result was the next. When strings were stored outside of *.class files, number of loaded jsp-servlets increased about 3 times. Time of generation of *.jsp -> *.java -> *.class files was moderate decreased. But finally, all the
memory were occupied by jsp-servlets and tomcat threw OOME exception...

(I put strings to separated file, loaded them only of necessity and kept only
soft references to these strings.)

Regards,
Yarick.

Costin Manolache wrote:
Thanks for the patch...

This is a well known problem, JSPs are not unloaded unless the entire
webapp is unloaded. And to make things worse - by default all JSP
static content is compiled to strings, that take all the memory. I
think we have ( or had ) an option to generate some non .class file -
which could be more easily managed.

Unfortunately I'm not familiar enough with jasper code - but it looks
good to me. The model of keeping the entire jsp static content in
memory forever is IMO very broken... It may help cheat on some
benchmarks ( i.e. jsp versus html, etc ), but it's wrong for real
world.


Costin

On 3/3/06, Yaroslav Sokolov <[EMAIL PROTECTED]> wrote:

Hi,

I have found, that once loaded jsp-servlets are never unloaded.

To test I just configured tomcat to process *.html files by JspServlet
and then traversed jdk documentation. The result was not very exciting - after browsing ~ 150 pages tomcat cried "java.lang.OutOfMemoryError: Java heap space"
and started not to work...

So maybe it would be not a bad idea to try to keep in memeory just some fixed
number of jsp-servlets ?

I have written a sample implementation of such a policy, but it is not very elegant as internal structure containing jsp-servlets, it seems, was not designed for such actions...

Regards,
Yarick.

[skipped]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to