Hi MagMan
Correct, get more memory!
With Java based applications, like Tomcat, Magnolia or the Repository
you have to keep an eye on memory. As you correctly noticed, it's not
only the heap size you want to check, but also the Perm space.
Magnolia (especially the underlaying repository) are trimmed for
performance. This means, that a "major" part is uploaded into memory.
Most "node" information (hierarchy relation, node names and paths,
etc.) are kept in memory. This means, that a large Web site (a lot of
pages/nodes) needs more memory, because you definitely want to avoid
swapping.
During development we feel very comfortable with a 1GB heap. But if
you run Magnolia in an Application Server, then keep in mind that the
AS requires a lot of memory as well. An AS, like Weblogic or
Websphere, require about 512MB just to run smoothly. So when planning
your environment, we suggest going from 1GB upwards. I also suggest
that you avoid "memory slicing" if you expect to use all the
allocated memory. If you allocate 512MB max heap, I suggest setting
min heap also to 512MB. If you allocate 2GB of max heap, than you can
start with a min of 1GB. See, once the min heap is used, the JVM
allocates another slice of 128MB. This goes on until the max heap is
reached. This slicing has some little impact on performance.
If you have a lot of helper classes and servlets, with a lot of
methods, you will most probably want to set the perm size to 128MB.
The perm is the memory reserved to manage the class/method stack.
So when you develop with Magnolia, it makes sense to have 1GB of
memory. The good thing is that many notebooks and most desktops have
1GB as standard :-)
Cheers
Giancarlo
www.xumak.com
On Apr 29, 2007, at 1:08 PM, MAGMAN wrote:
Hi,
in my first mail I sent the output of the command "free". So I
thought this
would be enough space. But now I used your command with the
parameters. And
this is the output:
total used free shared buffers
cached
Mem: 8105 8042 62 0
174 2744
-/+ buffers/cache: 5122 2982
Swap: 12386 2178 10207
Total: 20491 10220 10270
This is way too less, isn't it?
So I think I need a real server, not just a VPS, right?
Thanks and BYE BYE. (Now with the correct spelling) :-)
MagMan
Magnolia - User mailing list wrote:
Hi MagMan,
That looks like the right way to set the initial heap size and the
max
heap size.
However, when I said that you should be able to resolve the
problem by
explicitly setting the initial heap and the max heap size, I was
incorrect.
"Could not reserve enough space for object heap. Could not create the
Java virtual machine."
This error message suggests that there is not enough physical memory
available on the machine to allocate to the java process.
What is the free memory available on your machine. Can you send the
output of the following command -
free -t -m
Regards,
-Deepak
On Sun, 2007-04-29 at 04:12 -0700, MAGMAN wrote:
I now tried the following:
In catalina.sh just after the inition comments I wrote the line
JAVA_OPTS="-Xmx256m -Xms128m";
But that also didn't help. What am I doing wrong?!?
Thank for further assistance.
MagMan
MAGMAN wrote:
Hello,
first of all thanks for the answer. I tryed it out, bit
unfortunately
it
didn't help.
This is what I wrote and the following output.
cd cms/magnoliaNo1/magnolia-3.0.2/tomcat/bin;/opt/java/bin/java
-classpath
bootstrap.jar -Xms256m -Xmx600m -XX:PermSize=256m -
XX:MaxPermSize=256m
org.apache.cataline.startup.Bootstrap
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
What am I doing wrong?
Your second suggestion also sounds interesting. How do I have to
edit
my
start-up script to set initial
heap size and maximum heap size?
Thanks and buy buy,
MagMan
Magnolia - User mailing list wrote:
Hi MagMan,
The problem is that you are not allocating enough memory to the
java
process. You need to allocate more memory to the java process.
I do it
by using the following command.
cd /opt/servers/tomcat5.5/bin;/opt/java/jdk1.5/bin/java -classpath
bootstrap.jar -Xms256m -Xmx600m -XX:PermSize=256m -
XX:MaxPermSize=256m
org.apache.catalina.startup.Bootstrap
You can either edit your start-up script (startup.sh) to set
initial
heap size and maximum heap size or you can start the tomcat server
directly as I am doing.
Hope this helps.
Regards,
-Deepak Mittal
http://www.XebiaIndia.com
On Sat, 2007-04-28 at 09:01 -0700, MAGMAN wrote:
Hi all,
I'm still new in magnolia and Linux, so I would be glad for
some help
with
my problem. I installed and edited Magnolia successfull in my
local
windows
environment, but now I'm trying to install it on my Linux Server.
Problem
is, that I couldn't start it by executung "./startup.sh". I'm
getting
the
following Error Messages:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
The JAVA_HOME variable is set to: /opt/jdk1.5.0_11/
I'm using Apache Tomcat 5.0.28 and Magnolia 3.0.2.
Here are some information about the RAM of my Server:
total used free shared buffers
cached
Mem: 8299620 8288424 11196 0 167800
2427240
-/+ buffers/cache: 5693384 2606236
Swap: 12683308 2461552 10221756
It is a VPS.
Unfortunately I havn't found a solution by searching, so I hope
someone
is
there outside to help me.
Thanks a lot an buy buy!
MagMan
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------
--
View this message in context: http://www.nabble.com/Error-occurred-
during-initialization-of-VM-tf3662630.html#a10244962
Sent from the Magnolia - User mailing list archive at Nabble.com.
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------