users@glassfish.java.net

Re: [java.lang.OutOfMemoryError: Java heap space] error while downloading files

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Wed, 13 May 2009 11:18:27 -0400

Salut,

I think you are facing:

https://glassfish.dev.java.net/issues/show_bug.cgi?id=3683

Can you update to 2.1 or a more recent version of GF?

Thanks

-- Jeanfrancois

glassfish_at_javadesktop.org wrote:
> I've kept some large files (aroung 100MB) inside /docroot folder. But when i try to download those files from multiple clients (3 to 5 downloads at a time) the server becomes slow and throws the following error:
>
> [#|2009-05-13T13:57:47.000+1000|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=33;_ThreadName=httpSSLWorkerThread-8080-9;_RequestID=1220cf44-418a-4dfb-ad63-92739a782bc4;|
> java.lang.OutOfMemoryError: Java heap space
> |#]
>
> I am using the following setup:
>
> Memory: 2GB
> OS: Ubuntu 2.06 server
> JDK: 1.6.0-b105
> glassfish: v2_b58c
>
> JVM settings:
> <jvm-options>-XX:MaxPermSize=192m</jvm-options>
> <jvm-options>-server</jvm-options>
> <jvm-options>-XX:+AggressiveHeap</jvm-options>
> <jvm-options>-XX:-UseGCOverheadLimit</jvm-options>
> <jvm-options>-Dcom.sun.enterprise.server.ss.ASQuickStartup=false</jvm-options>
> <jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/lib/endorsed</jvm-options>
> <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options>
> <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>
> <jvm-options>-Xmx1400m</jvm-options>
> <jvm-options>-Xms1400m</jvm-options>
> <jvm-options>-Xss128k</jvm-options>
> <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
> <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>
> <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext${path.separator}${com.sun.aas.derbyRoot}/lib</jvm-options>
> <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options>
> <jvm-options>-Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder</jvm-options>
> <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
> <jvm-options>-Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar</jvm-options>
> <jvm-options>-Dcom.sun.enterprise.taglisteners=jsf-impl.jar</jvm-options>
> <jvm-options>-XX:NewRatio=2</jvm-options>
>
>
> Can anyone help me out to understand why i'm getting this error and if there is any possible workaround of this. Is there any other way to host large files in this server.
>
> Thanks heaps.
> [Message sent by forum member 'appserver_user' (appserver_user)]
>
> http://forums.java.net/jive/thread.jspa?messageID=346037
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>