Jump to content

Startup script ignores servername, Xmx and Xms options


Enoahe

Recommended Posts

Hi,

 

I'm trying to change startup java memory parameters as well as default server name. I've changed values for -Xms and -Xmx and appended -servername newname option to java invocation inside start-server.sh script (attached: start-server.sh), but it didn't really change anything:

 

steam@hq:~/pz$ bash -x ./start-server.sh
++ dirname ./start-server.sh
+ INSTDIR=.
+ cd .
++ pwd
+ INSTDIR=/home/steam/pz
+ /home/steam/pz/jre64/bin/java -version
+ echo '64-bit java detected'
64-bit java detected
+ export PATH=/home/steam/pz/jre64/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin
+ PATH=/home/steam/pz/jre64/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin
+ export LD_LIBRARY_PATH=/home/steam/pz/linux64:/home/steam/pz/natives:/home/steam/pz:/home/steam/pz/jre64/lib/amd64:
+ LD_LIBRARY_PATH=/home/steam/pz/linux64:/home/steam/pz/natives:/home/steam/pz:/home/steam/pz/jre64/lib/amd64:
+ JSIG=libjsig.so
+ LD_PRELOAD=:libjsig.so
+ ./ProjectZomboid64
pzexe: looking for PZXInitThreads.so
pzexe: libPZXInitThreads64.so was not found. This is ok for a server, but multi-core rendering won't work on a client without it.
pzexe: about to run java hack to locate libjvm.so...
pzexe: executing "java -classpath pzexe.jar -Djava.library.path=. zombie.pzexe"
pzexe.java: loading shared library "pzexe_jni64"
JVM=/home/steam/.steam/steamcmd/pz/jre64/lib/amd64/server/libjvm.so
pzexe config file: /home/steam/.steam/steamcmd/pz/ProjectZomboid64.json
pzexe: mainClass: zombie/network/GameServer
pzexe: classpath: -Djava.class.path=java/:java/jinput.jar:java/lwjgl.jar:java/lwjgl_util.jar:java/trove-3.0.3.jar:java/sqlite-jdbc-3.8.10.1.jar:java/uncommons-maths-1.2.3.jar
pzexe: vmArg (json) 1: -Xms2048m
pzexe: vmArg (json) 2: -Xmx2048m
pzexe: vmArg (json) 3: -Dzomboid.steam=1
pzexe: vmArg (json) 4: -Dzomboid.znetlog=1
pzexe: vmArg (json) 5: -Djava.library.path=linux64/:natives/
pzexe: vmArg (json) 6: -XX:-UseSplitVerifier
pzexe: vmArg (json) 7: -Djava.security.egd=file:/dev/urandom
pzexe: vmArg (json) 8: -XX:+UseConcMarkSweepGC
pzexe: vmArg (json) 9: -XX:-OmitStackTraceInFastThrow
pzexe: using jvm "/home/steam/.steam/steamcmd/pz/jre64/lib/amd64/server/libjvm.so"
1539223647788 versionNumber=39.67.5 demo=false
1539223647788 server name is "servertest"
...

As you can see,  name is still "servertest" (should be "newname"), -Xms and -Xmx equals 2048m instead of declared 26214m.

 

How can I increase memory allocation and server name in 39.67.5 server version?

 

Thanks.

Edited by Enoahe
Link to comment
Share on other sites

And, apparently, I'm wrong again. While fiddling with zombie horde sizes and spawn rates I've stumbled upon couple out of memory errors, like this:

 

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "UdpEngine"
Exception in thread "PolyPathThread" java.lang.OutOfMemoryError: Java heap space

Eventually JVM crashed and generated report file that says, among the other things, this:

VM Arguments:
jvm_args: -Xms2048m -Xmx2048m ...

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...