Skip to content

Conversation

@rubbersteak
Copy link
Contributor

The Curseforge server type has not been using the specified memory options. The startup logs (screenshot below) and server memory usage indicate that only 4GB is allocated regardless of the values set in the environment variables. Min 8GB, Max 16GB, and Aikar's flags have been enabled but the java args remain at -Xms4G -Xmx4G.

image

The issue is that the launch script used by /data/FeedTheBeast/start.sh uses the variables set in /data/FeedTheBeast/variables.txt to determine java launch options. The docker scripts set the desired launch options to variables but never write them to this file.

The proposed change replaces the current JAVA_ARGS variable in variables.txt with the ones defined within the script. Logs from the revised build show the desired result below.

image

Copy link
Owner

@itzg itzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for enhancing this. If you add the requested conditional I'm good to merge.

else
JVM_ARGS="${JVM_XX_OPTS} ${JVM_OPTS} $expandedDOpts"
JVM_ARGS=${JVM_ARGS//$'\n'/}
sed -i "s~JAVA_ARGS=.*~JAVA_ARGS=\"${JVM_ARGS}\"~" "${FTB_DIR}/variables.txt"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a conditional on variables.txt file existing. One big reason I deprecated support for server modpacks is that there was no guaranteed consistency. Some embed the equivalent in their start script.

@rubbersteak
Copy link
Contributor Author

Conditional has been added. I have no idea how the other modpacks are structured and thought the server start sequence would be standard. Thanks for your work on this docker image.

Copy link
Owner

@itzg itzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. Yes, you'd assume/expect consistency...but nope 😄

@itzg itzg changed the title Fix Curseforge servers launching without specified java options Enhance CurseForge server packs that use variables.txt Jun 1, 2024
@itzg itzg merged commit 820d401 into itzg:master Jun 1, 2024
sevenrats pushed a commit to sevenrats/docker-minecraft-server that referenced this pull request Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants