Enoahe Posted October 11, 2018 Share Posted October 11, 2018 (edited) 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 October 11, 2018 by Enoahe Link to comment Share on other sites More sharing options...
Enoahe Posted October 11, 2018 Author Share Posted October 11, 2018 Well, I've kinda fixed it. Apparently those options should be appended after "./ProjectZomboid" part, like this: LD_PRELOAD="${LD_PRELOAD}:${JSIG}" ./ProjectZomboid64 -Xmx26214m -Xms26214m -servername newname"$@" Massi 1 Link to comment Share on other sites More sharing options...
Massi Posted October 11, 2018 Share Posted October 11, 2018 Thanks for the info !! Link to comment Share on other sites More sharing options...
Enoahe Posted October 11, 2018 Author Share Posted October 11, 2018 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 More sharing options...
Enoahe Posted October 12, 2018 Author Share Posted October 12, 2018 Apparently, Xmx and Xms options should be specified in json config, here: ~steam/.steam/steamcmd/pz/ProjectZomboid64.json (or ProjectZomboid32.json if you using 32-bit version of the server). Massi 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now