11-18-2011, 05:35 PM
ОС: Debian 6.03
Аналогично было и на Ubuntu 10.10
Проблема: Пишет не хватку ОЗУ при любой выделенной памяти!
Ошибка:
Файл: GameServer_loop.sh
Аналогично было и на Ubuntu 10.10
Проблема: Пишет не хватку ОЗУ при любой выделенной памяти!
Ошибка:
Цитата:Error occurred during initialization of VM
The size of the object heap + VM data exceeds the maximum representable size
Файл: GameServer_loop.sh
#!/bin/sh
# ======== Optimize memory settings =======
# Minimal size with geodata is 1.5G, w/o geo 1G
# Make sure -Xmn value is always 1/4 the size of -Xms and -Xmx.
# -Xms<size> set initial Java heap size
# -Xmx<size> set maximum Java heap size
# -Xmn<size> Size of young generation
# If you have a big server and lots of memory, you could experiment for example with
# nice -n -2 java -server -Dfile.encoding=UTF-8 -Xmn512m -Xms1G -Xmx2G -XXermSize=80m -XX:MaxPermSize=80m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts -XX:+UseConcMarkSweepGC -cp ./lib/*;l2nserver.jar l2n.game.GameServer
# ==========================================
# exit codes of GameServer:
# 0 normal shutdown
# 2 reboot attempt
while :; do
mv log/java-0.log "log/`date +%Y-%m-%d_%H-%M-%S`_java.log"
mv log/error-0.log "log/`date +%Y-%m-%d_%H-%M-%S`_error.log"
mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log"
nice -n -2 java -server -Dfile.encoding=UTF-8 -Xms4024m -Xmx4024m -XXermSize=80m -XX:MaxPermSize=80m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts -XX:+UseConcMarkSweepGC -cp ./lib/*:l2nserver.jar l2n.game.GameServer > log/stdout.log 2>&1
[ $? -ne 2 ] && break
sleep 10;
done