Altitude Game: Forums  

Go Back   Altitude Game: Forums > Altitude Support > Dedicated Server

Dedicated Server Discuss technical issues related to hosting your own servers.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-17-2009, 02:13 PM
bmaker bmaker is offline
Junior Member
 
Join Date: Dec 2009
Location: Germany
Posts: 10
Default Linux Installer: "Could not reserve enough space for object heap"

Just downloaded Altitude's linux client, but I'm encountering a problem executing the installer:
Quote:
-[root@xxx](/opt/altitude) ./altitude.sh
Unpacking JRE ...
Preparing JRE ...
Starting Installer ...
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

-[root@xxx](/opt/altitude) ./altitude.sh -c
Unpacking JRE ...
Preparing JRE ...
Starting Installer ...
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
128 MB and more should be available exclusively for altitude. Thus it is rather not a matter of having not enough memory.

Operating system: Ubuntu 8.04
User account: root (as long as altitude doesnt run at all)

What else to mention?

Help is appreciated.

Best regards, bmaker
Reply With Quote
  #2  
Old 12-17-2009, 06:21 PM
bmaker bmaker is offline
Junior Member
 
Join Date: Dec 2009
Location: Germany
Posts: 10
Default

After 4 hours I got it working:
On many virtual servers java is too greedy regarding memory usage, because there seems to be a lot of free memory, which is in fact used by the other virtual server instances on the same machine.

This problem can be fixed by manually setting the maximum heapsize with the parameter "-Xmx128m" (meaning "heapsize maximum is 128 megabyte"). E.g. instead of "java -version" you now write "java -Xmx128m -version".

Of course it is a pain and sometimes impossible to add this parameter to each java call. So you can set the environment variable _JAVA_OPTIONS by executing the following command:
Quote:
export _JAVA_OPTIONS="-Xmx128m"
This adds "-Xmx128m" to each java call automatically.

And finally it also helped me to get altitude working.

Note:
The export-command above does only set _JAVA_OPTIONS for the current session. After you logout the setting will no more be in effect.
However, on Ubuntu you can make environment variables permanent by editing the file /etc/environment.
Other linux distributions might also have this file... but I am not sure.

Last edited by bmaker; 12-17-2009 at 06:24 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:42 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
2008 Nimbly Games LLC