You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Johan Compagner <jc...@servoy.com> on 2017/09/01 09:03:29 UTC
jre leak prevention
Hi,
i got reports that running jasper reports is suddenly a lot slower when
deployed..
(compared what he uses in developer)
Running a report was 0-2 seconds in its developer but at least 10 seconds
when running deployed.
We tracked it down, in developer the listener:
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"
/>
was not in the server.xml and at deploy it is a standard latest tomcat
install which enables that by default
If i look at this, i wonder which part makes it much slower
https://tomcat.apache.org/tomcat-8.0-doc/config/listeners.html#JRE_Memory_Leak_Prevention_Listener_-_org.apache.catalina.core.JreMemoryLeakPreventionListener
--
Johan Compagner
Servoy
Re: jre leak prevention
Posted by Mark Thomas <ma...@apache.org>.
On 01/09/17 11:25, Johan Compagner wrote:
<snip/>
> We tested it and the winner is:
>
> <Listener
> className="org.apache.catalina.core.JreMemoryLeakPreventionListener"
> urlCacheProtection="false" />
>
> i had my bets on the xmlParsingProtection but that wasn't it...
When I took a look through the options, urlCacheProtection looked to be
the most likely.
Be aware you may end up with some file locking / memory leak issues on
web application reload with that disabled. The simplest solution is to
restart Tomcat as part of the redeployment process.
As of Java 9, there is a new API that allows more selective disabling of
caching so we'll be able to disable it just for JARs when running on
Java 9. Generally, we got a whole bunch of memory leak issues fixed for
Java 9. Oracle were very receptive to fixing the bugs we reported. See
[1] for more info.
Which reminds me, we need to update the listener to use this new API
when running on Java 9.
Mark
[1] https://github.com/markt-asf/memory-leaks
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: jre leak prevention
Posted by Johan Compagner <jc...@servoy.com>.
On 1 September 2017 at 11:10, Mark Thomas <ma...@apache.org> wrote:
> On 01/09/17 10:03, Johan Compagner wrote:
> > Hi,
> >
> > i got reports that running jasper reports is suddenly a lot slower when
> > deployed..
> > (compared what he uses in developer)
> > Running a report was 0-2 seconds in its developer but at least 10 seconds
> > when running deployed.
> >
> > We tracked it down, in developer the listener:
> >
> > <Listener className="org.apache.catalina.core.
> JreMemoryLeakPreventionListener"
> > />
> >
> >
> >
> >
> > was not in the server.xml and at deploy it is a standard latest tomcat
> > install which enables that by default
> >
> > If i look at this, i wonder which part makes it much slower
> > https://tomcat.apache.org/tomcat-8.0-doc/config/
> listeners.html#JRE_Memory_Leak_Prevention_Listener_-_
> org.apache.catalina.core.JreMemoryLeakPreventionListener
>
> You can disable each protection individually so you should be able to
> answer that question yourself. (And the answer would be very interesting.)
>
We tested it and the winner is:
<Listener
className="org.apache.catalina.core.JreMemoryLeakPreventionListener"
urlCacheProtection="false" />
i had my bets on the xmlParsingProtection but that wasn't it...
Re: jre leak prevention
Posted by Mark Thomas <ma...@apache.org>.
On 01/09/17 10:03, Johan Compagner wrote:
> Hi,
>
> i got reports that running jasper reports is suddenly a lot slower when
> deployed..
> (compared what he uses in developer)
> Running a report was 0-2 seconds in its developer but at least 10 seconds
> when running deployed.
>
> We tracked it down, in developer the listener:
>
> <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"
> />
>
>
>
>
> was not in the server.xml and at deploy it is a standard latest tomcat
> install which enables that by default
>
> If i look at this, i wonder which part makes it much slower
> https://tomcat.apache.org/tomcat-8.0-doc/config/listeners.html#JRE_Memory_Leak_Prevention_Listener_-_org.apache.catalina.core.JreMemoryLeakPreventionListener
You can disable each protection individually so you should be able to
answer that question yourself. (And the answer would be very interesting.)
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org