On 29/07/2011 08:41, André Warnier wrote: > Pid wrote: >> On 28/07/2011 20:07, Alejandro Henao González wrote: >>> I dont believe that have GC running all the time, but the GC is >>> called in the above line to HTMLEncoder.encode. as follows. >>> System.gc(); >>> resultado = htmlEncoder.encode(resultado); >> >> Is 'htmlEncoder' a static field, an instance field or defined inside the >> method scope? >> >>> response.reset(); >> >> Why are you resetting the response? >> >> > I'm not the real Java specialist here, but maybe one isn't really needed > here. > The code above seems to suggest that this application is forcing a major > garbage collection at every request (or more). Is there a need to look > anywhere else as to why this Tomcat is saturating the host's CPU and why > threads are always suspended ? > > (Philip already pointed this out, but maybe he wasn't forceful enough in > making the point)
The GC will cause problems, yes. I am wondering whether the htmlEncoder is thread-safe too. The response.reset() may be superfluous. Just a little extra help... p --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org