Java Error

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Xvad
Posts: 53
Joined: Sun Mar 21, 2010 1:20 pm

Java Error

Post by Xvad »

Hello ppl !!!
Couple of minutes ago I installed Geodata and pathnodes on my server and everything went successful until I entered ingame. L2 just stucks and only way to exit it is to end the process from Task Manager. Here is the snapshot of Gameserver console error:
Image
As it seems I ran out of memory and because of that, edited the gameserver file in order to change -xmx for java. So I did that, put -xmx 512, but java still uses 1.3GB memory of my ram. don't know what else to do. This is my Gameserver file's configuration

Code: Select all

@echo offtitle Game Server Console:startecho Starting L2J Game Server.echo.REM -------------------------------------REM Default parameters for a basic server.java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms1024m -Xmx1024m -cp ./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServerREMREM If you have a big server and lots of memory, you could experiment for example withREM java -server -Xmx512m -Xms512m -Xmn256m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOptsREM If you are having troubles on server shutdown (saving data),REM add this to startup paramethers: -Djava.util.logging.manager=com.l2jserver.L2LogManager. Example:REM java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xmx1024m -cp ./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServerREM -------------------------------------if ERRORLEVEL 2 goto restartif ERRORLEVEL 1 goto errorgoto end:restartecho.echo Admin Restart ...echo.goto start:errorecho.echo Server terminated abnormalyecho.:endecho.echo server terminatedecho.pause 
So be kind and tell me your suggestion about solving this issue.
Thx in advance
L2J Revision 4122:
L2JDP Revision 7322:
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Java Error

Post by denser »

1.3 Gb blame your geodata - its in memory - 700 mb extra space required. and seems to me your system cant run game and server at same time :) its bad idea to do like that
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
Xvad
Posts: 53
Joined: Sun Mar 21, 2010 1:20 pm

Re: Java Error

Post by Xvad »

denser wrote:1.3 Gb blame your geodata - its in memory - 700 mb extra space required. and seems to me your system cant run game and server at same time :) its bad idea to do like that
My PC has 2Gb of ram and I use it only for developing purposes as I'm not hosting server at home :wink: and I also know that its fault of Geodata, because untill I installing it, server functioned normally. So do u know how to solve this issue? :roll:
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Java Error

Post by denser »

try to set priority to java process to high or realtime, it help me long ago when i developed server on pc itself :)
also try to update JRE
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
Xvad
Posts: 53
Joined: Sun Mar 21, 2010 1:20 pm

Re: Java Error

Post by Xvad »

denser wrote:try to set priority to java process to high or realtime, it help me long ago when i developed server on pc itself :)
also try to update JRE
Now Java uses 1.4Gb of memory lol and ofcourse problem still persists :x
Xvad
Posts: 53
Joined: Sun Mar 21, 2010 1:20 pm

Re: Java Error

Post by Xvad »

At last I solved it !!!
Configured Gameserver file this way:

Code: Select all

@echo offtitle Game Server Console:startecho Starting L2J Game Server.echo.REM -------------------------------------REM Default parameters for a basic server.java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms256m -Xmx512m -cp ./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServerREMREM If you have a big server and lots of memory, you could experiment for example withREM java -server -Xmx512m -Xms256m -Xmn128m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOptsREM If you are having troubles on server shutdown (saving data),REM add this to startup paramethers: -Djava.util.logging.manager=com.l2jserver.L2LogManager. Example:REM java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xmx512m -cp ./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServerREM -------------------------------------if ERRORLEVEL 2 goto restartif ERRORLEVEL 1 goto errorgoto end:restartecho.echo Admin Restart ...echo.goto start:errorecho.echo Server terminated abnormalyecho.:endecho.echo server terminatedecho.pause
And also changed the priority of Java.exe to Realtime, using Task Manager. Now I play on my serv without any obstacles, but I wonder if this configurated Gameserver's file will be capacious for 300-500 ppl? Because in couple of days I'll host the server in a good hosting company which will have PC with great specifications, like 8Gb of RAM or so and what I'm thinking is that if I set -xmx for example 4096 or more, will there be smoother gameplay on server?
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: Java Error

Post by MELERIX »

take care that java priority shouldn't be changed to "high or realtime" for public servers, other way you will have high CPU usage xD

So... using java priority with "high or realtime", is only for when you test L2JServer + L2 Client in the same computer (to avoid local lag), anyway if you have a good computer is not needed.
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: Java Error

Post by JIV »

you will have problem with 100ppl with such memory settings.
Xvad
Posts: 53
Joined: Sun Mar 21, 2010 1:20 pm

Re: Java Error

Post by Xvad »

so guys for now I can keep these settings while developing server and when it would be ready to host I should increase -xmx -xms and -xmn values right? and what velues should there be if I want for example 300 ppl on my serv?
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: Java Error

Post by MELERIX »

these values depend mostly according to the amount of RAM that you have in the machine where you will use the server.

if you have a machine with 1GB in RAM leave default values, you don't need to modify nothing, but if you have a machine with 4GB of RAM or more and you have a server with 200+ people, probably you will need to change these values ;)
Xvad
Posts: 53
Joined: Sun Mar 21, 2010 1:20 pm

Re: Java Error

Post by Xvad »

MELERIX wrote:these values depend mostly according to the amount of RAM that you have in the machine where you will use the server.

if you have a machine with 1GB in RAM leave default values, you don't need to modify nothing, but if you have a machine with 4GB of RAM or more and you have a server with 200+ people, probably you will need to change these values ;)
Ok I got that, but what values do I have to put there, for example if I have 4Gb of RAM, what should -xmx, -xms and -xmn be?
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: Java Error

Post by MELERIX »

Post Reply