users@glassfish.java.net

Re: GF3-1 Non GUI Installation and JVM option

From: Tom Mueller <tom.mueller_at_oracle.com>
Date: Fri, 08 Apr 2011 09:16:21 -0500

First, check to see if you have enough memory on the system. Since you
are running with 2GB, it is possible that with many other processes on
the system and not enough swap space, you could be running out of memory
at the system level. To do this, run the "top" program. At the top of
the display is the amount of memory and swap and you can see how much is
in use. To run GlassFish, you need to have about 1GB free. If there
isn't that much free, then you need to add additional swap space.

If there is enough system memory, you can increase the amount of memory
available to GlassFish with the following command:

asadmin --echo delete-jvm-options -Xmx512m
asadmin --echo create-jvm-options -Xmx800m (or whatever number you want)

Tom


On 4/8/2011 4:59 AM, Florent THOMAS wrote:
> Hy all of you,
>
> I used the .zip and extract it in the appropriate folder that suits to me.
> I'm running on a old XL VPS hosted by 1and1 with 2Go for RAM and x86_64
> I've properly configured the java installation :
>
> /java -version
> java version "1.6.0_24"
> Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
> Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
> /
> The $JAVA_HOME is well defined as well :
>
> /echo $JAVA_HOME
> /usr/java/jdk1.6.0_24/
>
> As I run the asadmin start-domain domain1 everything to be ok as the
> prompt said everythings OK.
> Moreover the loclahost:8080 answers and the log as no errors.
> Unfortunately, as I try to access to the admin console via
> localhost:4848, I have some memory problems :
>
> /[#|2011-04-08T11:54:55.494+0200|SEVERE|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=88;_ThreadName=Thread-1;|Exception
> in thread "Thread-42" |#]
>
> [#|2011-04-08T11:54:55.507+0200|SEVERE|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=88;_ThreadName=Thread-1;|java.lang.OutOfMemoryError:
> unable to create new native thread
> at java.lang.Thread.start0(Native Method)
> at java.lang.Thread.start(Thread.java:640)
> at
> java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727)
> at
> java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:657)
> at
> java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:78)
> at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:117)
> at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:81)
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:247)
> at
> com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:364)
> at
> com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:210)
> at
> com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:108)
> |#]
>
> [#|2011-04-08T11:54:57.073+0200|INFO|glassfish3.1|com.sun.jersey.server.impl.application.WebApplicationImpl|_ThreadID=22;_ThreadName=Thread-1;|Initiating
> Jersey application, version 'Jersey: 1.5 01/14/2011 12:36 PM'|#]
> /
> I found this :
> http://candrews.integralblue.com/2009/01/preventing-outofmemoryerror-native-thread/
> (I made some unsuccesfull tests using this post)
> and that :
> http://candrews.integralblue.com/2009/01/preventing-outofmemoryerror-native-thread/
>
> But as a french reader and almost a linux newbie I'm a little lost in
> what I can do to let my admin console launch.
>
> Thanks for your help
>
> Regards