tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Kientzle <kient...@acm.org>
Subject Re: Problem with Tomcat
Date Wed, 19 Jul 2000 17:59:31 GMT
The JVM memory settings are options to the JVM.  Type 'java' by itself
to get a list of options, 'java -X' by itself to get a list of
"non-standard" options, including options to set the maximum size
of the Java heap.  You can include these options as part of JAVACMD
(easiest to just edit tomcat.sh and look for where it sets JAVACMD).

If you're using the Oracle 1.1.1 libraries (classes111.zip), you should
upgrade to a later version; the 'thin' drivers in the 1.1.1 version
have some bad memory leaks.  Also, if you're opening a connection for
each page, make sure you close the connection explicitly; never rely
on garbage collection to clean up your database handles.

For debugging, I've always found it useful to insert something like
the following at the beginning and end of my 'doGet' routine:

System.err.println("Heap size:
"+(Runtime.totalMemory()-Runtime.freeMemory()));

This simply queries the JVM for the amount of available memory, and is
a good way to monitor your heap size.  If your heap size continues
to grow on every page, then you've got a problem somewhere.  One
common problem is to design code that caches results for future use,
but never empties the cache.

				- Tim

> Thanks Xander,
>  
> I am using thin client already.  However, I couldn't find the JVM setting you mentioned
in the conf files. 
> Anyway, I have minimize the settings in the conf files so as to minimize the loading.
 Unfortunately, the
> problem still exist!!!
>  
> Are you making and progress on your side?
>  
> Regards,
>  
> George Cheng
> 
>      ----- Original Message ----- 
>      From: Xander Heemskerk 
>      To: tomcat-user@jakarta.apache.org ; georgecheng@olvision.com 
>      Sent: Friday, July 14, 2000 10:24 PM
>      Subject: Re: Problem with Tomcat
> 
>      George,
>       
>      We having simular problems with a simular configuration (Solaris 2.6).
>      We haven't solved it yet but think it depends on:
>      1) Which JDBC driver thin or OCI. thin could be better.
>      or
>      2) Min and Max setting of your JVM heap. Set min is max to prevent garbage collection
problems
>      Goodluck
>      Let me know how you are faring.
>      Greeting and regards
>      Xander Heemskerk
>       
> 
>          ----- Original Message ----- 
>          From: George Cheng 
>          To: tomcat-user@jakarta.apache.org 
>          Sent: Wednesday, July 12, 2000 11:27 AM
>          Subject: Problem with Tomcat
> 
>          Dear Sirs,
>           
>          I am having some problems with my Tomcat.  I don't know if anyone can help me
to solve the
>          problem.
>           
>          Platform/OS:  Sun Solaris 7.0
>          Web server:    Apache
>          DB:                Oracle
>          Java:            Java1.2
>          Tomcat:        3.1
>           
>          Problem:  
>          My Java Servlets run fine.  but than, after a while the servlets failed to display
anything
>          on the browser and a blank, white screen was displayed.  The servlets resumed
their normal
>          function after Tomcat was retsarted.  Log files are attached for your reference.
>           
>          Your help in this matter would be highly appreciated.
>           
>          Thanks & Regards,
>           
>          George Cheng
>          Tel: (852) 2189 7839
>          Fax: (852) 2189 7811
>           
>           
>

Mime
View raw message