JDK Memory problem: How to limit memory for java

Use this forum for questions regarding installation, upgrading and configuration of OpenEMM

Moderator: moderator

mrmuehle
Posts: 2
Joined: Sun Oct 21, 2007 8:39 pm

JDK Memory problem: How to limit memory for java

Post by mrmuehle »

After several tries to install I only get this result:

Code: Select all

500 Servlet Exception

Resin can't execute the compiler `/bin/sh'.  This usually means that the
compiler is not in the operating system's PATH or the compiler is incorrectly
specified in the configuration.  You may need to add the full path to <java
compiler='/bin/sh'/>.

java.io.IOException: java.io.IOException: Cannot allocate memory

Resin-3.0.19 (built Mon, 15 May 2006 04:50:47 PDT)
I got this help from my provider Hosteurope:
Leider berechnet Java die Menge des verfügbaren Speichers auf VPS falsch. Bitte limitieren Sie die Menge des genutzen RAMs bei Start der Anwendung.
It says: you should limit the memory for JDK, because the VPS calculates the available memory in a wrong way.

How much memory do I need to satisfy OpenEMM and the JDK?
How to limit the memory?
I guess with jaca -mx20 f.e. but what value and in wich script?

Do You know any tricks to debugg this?
which logfile would help me?
is there a cheap VPS hosting service offering more memory for 9,90€?


Suse 10.0, 128 MB RAM garanted, garantiert
512 MB RAM dynamic
Hosteurope VPS Linux M 2.0,
9,90 €/ month
petz
Posts: 3
Joined: Tue Jan 15, 2008 2:17 pm

Post by petz »

I am having the same problems.
I also have a Vserver at hosteurope.
I Have the exact same vserver.

The Point you need to limit jvm is here:
/home/openemm/bin/httpd.sh
args="-J-Dlog.home=/home/openemm/var/log -J-Dlog4j.configuration=emm.properties -J-Xms32M -J-Xmx128M"
Xms is the initial Memory that the JVM allocates
Xmx is the maximum Memory the JVM can allocate

Still not have it working jet, same error remains, but there is the point where you can start debugging.

Also if typing in the command:

Code: Select all

ps aux | grep java
should give you
openemm 16141 55.3 0.9 363172 37804 pts/0 Rl 20:24 0:01 /opt/openemm.org/software/java/bin/java -Dlog.home=/home/openemm/var/log -Dlog4j.configuration=emm.properties -Xms32M -Xmx128M -Xss1m -Dresin.home=/home/openemm -Dserver.root=/home/openemm -Djava.util.logging.manager=com.caucho.log.LogManagerImpl -Djavax.management.builder.initial=com.caucho.jmx.MBeanServerBuilderImpl com.caucho.server.resin.Resin -socketwait 44700 -conf /home/openemm/conf/console.conf -server console -stdout /home/openemm/var/log/console_stdout.log -stderr /home/openemm/var/log/console_stderr.log
openemm 16153 55.3 0.9 363172 37884 pts/0 Rl 20:24 0:01 /opt/openemm.org/software/java/bin/java -Dlog.home=/home/openemm/var/log -Dlog4j.configuration=emm.properties -Xms32M -Xmx128M -Xss1m -Dresin.home=/home/openemm -Dserver.root=/home/openemm -Djava.util.logging.manager=com.caucho.log.LogManagerImpl -Djavax.management.builder.initial=com.caucho.jmx.MBeanServerBuilderImpl com.caucho.server.resin.Resin -socketwait 44701 -conf /home/openemm/conf/redirection.conf -server redirection -stdout /home/openemm/var/log/redirection_stdout.log -stderr /home/openemm/var/log/redirection_stderr.log
root 16198 0.0 0.0 2844 812 pts/0 S+ 20:24 0:00 grep java
There you se the parameters given to jvm

:)

If I get it running I tell you how.
petz
Posts: 3
Joined: Tue Jan 15, 2008 2:17 pm

Post by petz »

I gave up.

Seems that the Problem is the stack size of 1MB.

/home/openemm/bin/wrapper.pl
#
# Default stack size. The 1m is a good tradeoff between stack size and
# allowing more threads. The default stack size doesn't allow enough
# threads for several operating systems.
#
$DEFAULT_STACK_SIZE="-Xss1M";
I tried to lower it, but then another exception occurs saying "Heap size to small".

The Virtuozzo Virtualisation hosteurope uses seems to be not suited for running java application servers.

Tomorrow I will check the OpenEMM VMWare Server config.
Maybe the Solution is hidden there. Perhaps you should download VMWare Player, start the OpenEMM Vmware Server and look into the mentioned files. Maybe there is the solution.
mrmuehle
Posts: 2
Joined: Sun Oct 21, 2007 8:39 pm

JDK Hosteurope

Post by mrmuehle »

Thanks fpr your help,

i think it needs a bigger vserver.
May be we put it inhouse and use a vm.

thnks for posting your hints anyway.
shijiunv
Posts: 1
Joined: Fri Oct 30, 2009 4:46 am

Post by shijiunv »

Increase memory or Reduce -Xmx
Post Reply