[Deploying Sakai] Java Out of Memory Error with Sakai 2.5 on Windows

Matthew Jones jonespm at umich.edu
Fri Jul 17 11:40:21 PDT 2009


This is my setenv.bat on the windows QA-6 server, it's pretty minimal
and matches the install guide. It is in the tomcat/bin directory. I
was able to start it up with or without double quotes. You'd probably
want to remove the -Dsakai.security or -Dsakai.home (or at least
change them to point to where your sakai.properties and/or
security.properties files are)

I'm starting up tomcat from a windows service. I don't have any
environment variables set that would alter these settings. I know it
*seems* obvious I'd make sure it *really* is a .bat file as windows I
remember making it as a text file editing it and being annoyed it
wasn't seeing it for a few minutes at one time (since it hides the
.txt extension by default). That seems to happen to me often in
windows. :/

The server sounds about the same 4gb of ram. After startup tomcat5 is
using 415,114K.

setenv.bat
--------------
set JAVA_OPTS=-server -XX:+UseParallelGC -Xmx1024m
-XX:MaxPermSize=160m -Djava.awt.headless=true -Dsakai.demo=true
-Dsakai.security=C:\inetpub\tomcat\security
-Dsakai.home=C:\inetpub\tomcat\sakai

-Matthew

On Fri, Jul 17, 2009 at 12:49 PM, Shane Tully<tully.shane at bpsd.org> wrote:
> Hi all, I have been trying to get the binary installation of Sakai to run in
> a Windows (7 RC) environment. This comes after I was successful in getting
> the source to compile and run in a Linux environment. However, I am having
> trouble with compiling the source under Windows and decided to try to use
> the binary instead. My problem is that when I start Tomcat (with the sakai
> binary already put in place) the server starts up but soon throws the error
> “java.lang.OutOfMemoryError: Java heap space”. The package that this error
> occurs on is… “ERROR: Error deploying web application archive
> sakai-gradebook-testservice.war (2009-07-17 12:29:06,473
> Thread-1_org.apache.catalina.startup.HostConfig)”.
>
>
>
> I believe this to be a problem with my JAVA_OPTS, MAVEN_OPTS, CATALINA_OPTS,
> and/or setenv.bat variables/file. Below is the what the set command shows
> them to currently be.
>
>
>
> JAVA_OPTS="-server -Xms768m -Xmx768m -XX:PermSize=128m -XX:MaxPermSize=256m
> -XX:NewSize=192m -XX:MaxNewSize=384m"
>
> MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=64m -XX:MaxPermSize=128m"
>
> CATALINA_OPTS="-server -Xms768m -Xmx768m -XX:PermSize=128m
> -XX:MaxPermSize=256m -XX:NewSize=192m -XX:MaxNewSize=384m"
>
>
>
> (setenv.bat) set JAVA_OPTS=”-server -XX:+UseParallelGC -Xmx768m
> -XX:MaxPermSize=160m -Djava.awt.headless=true”
>
>
>
> They are set as the recommended values as I read in the installation
> documentation.
> (http://confluence.sakaiproject.org/display/DOC/Install+Guide+-+Binary+Install+%282.5%29#InstallGuide-BinaryInstall%282.5%29-javaenv)
>
>
>
> I have 4GB of RAM in the server and by watching the RAM usage from before
> Tomcat started to when I receive the error I’ve determined that after using
> ~200MB of RAM Sakai throws the out of memory error. A potential pitfall I’ve
> realized is, for a Windows environment, should those variables have double
> quotes around them, single quotes or no quotes at all?
>
>
>
> Any help is greatly appreciated. Thank you.
>
> _______________________________________________
> production mailing list
> production at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/production
>
> TO UNSUBSCRIBE: send email to production-unsubscribe at collab.sakaiproject.org
> with a subject of "unsubscribe"
>


More information about the production mailing list