Solved Another RAM related problem thread.

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Willie Tanner

New Member
Jul 29, 2019
5
0
0
Greetings all,

I am attempting to update the starting parameters of my server to increase the RAM allocation to a maximum of 3g.

I've gone through the whole process of creating a .bat file in notepad with this line:

"C:\Program Files\Java\jre7\bin\java.exe" -Xms1024m -Xmx3072m -jar "ftbserver.jar"

I've also attempted to use the ServerStart.bat file included with the mod pack and edited this file to read:

java -Xms512M -Xmx3G -jar ftbserver.jar

Whenever I try to start the server with these edited files the run command box opens for a second but instantly closes and the server is never started.

I am baffled. My server runs decently with the default RAM allocation but will occasionally get the warnings. I have a ton of RAM waiting to be used but can't get the damn thing to actually start.

Any help would be appreciated.
 

nperry

New Member
Jul 29, 2019
2
0
0
Is there a output from when you run in command prompt?

Are you using 32bit java? From experience 32bit java really doesn't like allowing 2gb to one process.
 

Willie Tanner

New Member
Jul 29, 2019
5
0
0
I am using 64 bit java.

When I run either the edited ServerStart file or my self created bat file the command window opens up so briefly I cannot read what it is in it before it closes.
 

nperry

New Member
Jul 29, 2019
2
0
0
I am using 64 bit java.

When I run either the edited ServerStart file or my self created bat file the command window opens up so briefly I cannot read what it is in it before it closes.
Run it from the Comand prompt.

Start Menu > Run > cmd > Use cd to change the the directory where the Start Server.bat is > run "Start Server.bat" This should give an output to see what is wrong.
 

Willie Tanner

New Member
Jul 29, 2019
5
0
0
When running either of these files from the Command Prompt the response is:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not Create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

As far as I can tell I've created the correct bat files to increase the RAM allocation, and I've got 12gb of RAM available on this machine. I'm not sure why it is unable to create space.

Edit: In my OP I incorrectly listed my self created .bat file. The actual line in this file is:

"C:\Program Files (x86)\Java\jre7\bin\java.exe" -Xms1024m -Xmx3072m -jar "ftbserver.jar"
 

Willie Tanner

New Member
Jul 29, 2019
5
0
0
I may have solved the issue. For my run.bat line I altered the java.exe location back to:

C:\Program Files\Java\jre7\bin\javaw.exe

And it appears to correctly open the server. I had altered the directory originally because I was having issues getting any response from the .bat files.

Hopefully this is a fix. Will update this post if I encounter any additional problems.

Edit: Gave it some time and looks to be all fixed up.
 

ImOk

New Member
Jul 29, 2019
21
0
0
you could also add a new line to your /bat so it would look like ...
"C:\Program Files\Java\jre7\bin\javaw.exe" -Xms1024m -Xmx3072m -jar "ftbserver.jar"
pause

the pause will put a "press any key to continue" before closing the window