tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shanmugam K <>
Subject Re: Tomcat process keeps growing in size
Date Fri, 30 Nov 2001 05:24:12 GMT
            Just try calling the garbage collector after you feel all the necessary work is

           To call the garbage collector you can add the following code to your source file.

                Runtime rt = Runtime.getRuntime();

            I feel this code can be inserted before the place where you are invalidating the
                session or at the end of that particular thread.

           I dont know whether this will solve your problem.
           But I feel it is worth giving a try.

 shanmugam k.

"Hawkins, Keith (Keith)" wrote:

> Hello,
> During stress testing of our application the Tomcat java.exe process
> keeps growing in both memory size and number of threads used.   Our test
> is basically to repeatedly log in to our authentication servlet.  We are
> using the same login over and over.  I added logic to track the previous
> HttpSession object and invalidate it every time the same user logs in
> with a new session.  This did not fix the memory problem.  The servlet
> being tested only allocates local variables which should be cleaned up
> after a given request completes.
> Are there some configurations I need to add or check?   Any ideas as to
> why the Tomcat process would keep growing?   Is there something I need
> to do to ensure garbage collection is run properly?
> Any help would be appreciated.
> We are running Tomcat 3.2.3 with the isapi redirector with IIS on
> Windows 2000.
> Thanks,
> Keith

View raw message