[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java heap space

Hi Pauline,

From the TDS documentation page (http://motherlode.ucar.edu:8080/thredds/docs/), take a look at the "Performance" page


It discusses a few JVM command-line options you should set to give your server more memory and make sure it is using the "server" settings for the java hotspot VM. Basically, in ${tomcat_home}/bin/startup.sh you can add something like:

   JAVA_OPTS="-server -Xmx512m -Xms128m"
   export JAVA_OPTS

which starts the server with 128meg of heap space and a max of 512meg. We actually give our main server 512meg to start and around 2Gig max. Choose your settings as appropriate for the machine on which your server is running.


Pauline Mak wrote:
Hi Ethan,

I've tried to use my test server again today, and have found that it's
getting a Java heap space problem. I then restarted my server and it
can load the large dataset. However, if I refreshed the page, I get the
Java heap space problem.

Ahh, I tried that restart/reload a few more times, and it seems like it
works for the first few loads, and then any large dataset will result in
the error.

Having said that, if I went back through the smaller dataset, TDS will
show smaller dataset fine.

This is what I get in catalina.out:

2007-05-09T12:17:27.275 +1000 [   3495267][      97] ERROR -
thredds.servlet.CatalogServicesServlet - doGet req=
 got Exception
java.lang.OutOfMemoryError: Java heap space
2007-05-09T12:17:27.294 +1000 [   3495286][      97] ERROR -
thredds.servlet.ServletUtil - handleException
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space

I tried to setup the remote management thing in tomcat without success, so I'm afraid I can't give you more details until I can get that up and running.



On Mon, 2007-05-07 at 09:23 -0600, Ethan Davis wrote:
Hi Pauline,

Did the cache permissions solve the problem you were having with scanning directories that contain large numbers of files? Was the scanning to generate a catalog or was it an aggregation?


Pauline Mak wrote:
HI Ethan,

Yes, I've noticed that occasionally it will show an OurOfMemory error.

I'm currently running is

THREDDS Data Server Version 3.14.02 Build Date = 2007-03-19 23:50:44
JVM is java version "1.5.0_09"
Tomcat is: 5.5

Wow, the oddest thing just happened.  I noticed that catalina.out were
printing out messages saying that tomcat had problems trying to access
cache.log.  So I went in and change the ownership of all cache* and then
THREDDS was able to load those big datasets without problems.  Oops,
sorry!  I should read the log more carefully!



-- Ethan R. Davis Telephone: (303) 497-8155 Software Engineer Fax: (303) 497-8690 UCAR Unidata Program Center E-mail: address@hidden P.O. Box 3000 Boulder, CO 80307-3000 http://www.unidata.ucar.edu/ ---------------------------------------------------------------------------

=============================================================================== To unsubscribe thredds, visit: http://www.unidata.ucar.edu/mailing-list-delete-form.html ===============================================================================

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.