Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

V83 - Out Of Memory / Laggy / Can't Use all portals

Newbie Spellweaver
Joined
Apr 16, 2018
Messages
25
Reaction score
0
Hi again,

So this is a really weird error I started getting lately, where the server seems to be laggy / not responding.. I tried to look up for the error but no hopes. I get an error that says "Out of memory" tried to follow some memory leakage tuts, but didn't seem to help
java.sql.SQLException: java.lang.OutOfMemoryError: GC overhead limit exceeded
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:430)
at com.mysql.jdbc.PreparedStatement.getInstance(PreparedStatement.java:553)
at com.mysql.jdbc.ConnectionImpl.clientPrepareStatement(ConnectionImpl.java:1378)
at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4143)
at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4042)
at client.ItemFactory.saveItems(ItemFactory.java:101)
at client.MapleCharacter.saveToDB(MapleCharacter.java:4374)
at client.MapleClient.disconnect(MapleClient.java:632)
at net.MapleServerHandler.sessionClosed(MapleServerHandler.java:103)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.sessionClosed(DefaultIoFilterChain.java:662)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:386)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$900(DefaultIoFilterChain.java:51) at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.sessionClosed(DefaultIoFilterChain.java:797)
at org.apache.mina.filter.codec.ProtocolCodecFilter.sessionClosed(ProtocolCodecFilter.java:317)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:386)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$900(DefaultIoFilterChain.java:51)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.sessionClosed(DefaultIoFilterChain.java:797)
at org.apache.mina.core.filterchain.IoFilterAdapter.sessionClosed(IoFilterAdapter.java:95)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionClosed(DefaultIoFilterChain.java:386)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireSessionClosed(DefaultIoFilterChain.java:379)
at org.apache.mina.core.service.IoServiceListenerSupport.fireSessionDestroyed(IoServiceListenerSupport.java:210)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeNow(AbstractPollingIoProcessor.java:535)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeSessions(AbstractPollingIoProcessor.java:497)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:61)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:974)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)uaemoh caught an exception: java.lang.OutOfMemoryError: GC overhead limit exceededjava.lang.OutOfMemoryError: GC overhead limit exceeded

EDIT:
Just some extra information:
- I use my WAN IP to run the server
- I use Heliosms

- When I tried to use the command "!warp 104040000" which is to hunting ground 1, an in-game error in the chat box appeared "Something went wrong NULL"
(Any extra information needed I will provide them)
 
Last edited:
Newbie Spellweaver
Joined
Apr 16, 2018
Messages
25
Reaction score
0
=.=

So..

I have been testing to see exactly what is happening..

- MapleCharacter.java for some reasons this file is not updating [Yes, I tried to update other files and they worked except this one]
- I initially said most portals don't work. That is not true, after I try to use "henesys - hunting ground I" portal THEN I can't use skills/ use portals/ ... etc same as lag simply.

Any clue guys? :/
 
Upvote 0
Skilled Illusionist
Joined
Apr 26, 2015
Messages
302
Reaction score
77
java d64 -Xmx4g -Xms512m -XX:+UseConcMarkSweepGC -XX:MaxGCPauseMillis=350

Add this to your run script and PLEASE fix the memory leak.
 
Upvote 0
Newbie Spellweaver
Joined
Apr 16, 2018
Messages
25
Reaction score
0
The line you provided is meant for which script? And what is the use of it?

Second about the memory leak, i’m trying to solve it, but it doesn’t look like there is a problem with it currently.

As I said only the map 104040000 is causing the problem.

Thank you
 
Upvote 0
Skilled Illusionist
Joined
Apr 26, 2015
Messages
302
Reaction score
77
Your server is compiled to a jar file. This jar file is executed by the Java Virtual Machine, which is represented by the java.exe executable.

What those parameters does is increase the memory and use another implementation of the garbage collector of the JVM.

See if it helps.

I really suggest that you study Java and the JVM before approach those problems.
 
Upvote 0
Newbie Spellweaver
Joined
Apr 16, 2018
Messages
25
Reaction score
0
I tried your suggestion,

But it seems that any portal leading to (104040000 - Henesys hunting ground 1) doesn't work and it causes a lag/most probably to a disconnect after sometime.
 
Upvote 0
Junior Spellweaver
Joined
Sep 16, 2017
Messages
156
Reaction score
36
Mmm are the two problems linked? Like, does the out-of-memory error happen only after you attempted to enter HHG1, or can it also happen before?
 
Upvote 0
Newbie Spellweaver
Joined
Apr 16, 2018
Messages
25
Reaction score
0
Hi Pipotron,

Sorry for the late reply as I was testing to give you a clear answer.

So far, the memory issue is not appearing anymore... However, the part that I can't go to HHG1 still exist but no memory leak error anymore..

Still testing more, if anything came up I will update you
 
Upvote 0
Junior Spellweaver
Joined
Sep 16, 2017
Messages
156
Reaction score
36
No worries c:

So, since neither the portals nor a warp command allow you to enter the map, there's probably something wrong within the map itself.

That "something is wrong" chat message you're receiving comes from here (from line 351 of JrGM.java, in HeliosMS source):

PHP:
if (splitted[0].equals("warp")) {
   // ...skipping irrelevant code...
   try {
   // ...
             {
                int map = Integer.parseInt(splitted[1]);
                MapleMap target = cserv.getMapFactory().getMap(map);
                c.getPlayer().changeMap(target, target.getPortal(0));
             }
         } catch (/* Remote */Exception e) {
                player.dropMessage("Something went wrong " + e.getMessage());
         }
}

The exception message you're receiving is null, so there's a chance you might be getting a null pointer exception (as it generally comes without a message). In order to verify this, change that e.getMessage() to e.getClass().getName() , and let me know what's printed on screen.

If a null pointer is the actual issue, it means that your HHG1 is missing some elements that should be loaded with it, according to its image in Map.wz. Is your HHG1 edited?
 
Upvote 0
Newbie Spellweaver
Joined
Apr 16, 2018
Messages
25
Reaction score
0
Hi Pipotron,

I got the following error

PHP:
Something went wrong java.lang.NullPointerException
 
Upvote 0
Junior Spellweaver
Joined
Sep 16, 2017
Messages
156
Reaction score
36
Mhm, as I imagined.

So, basically, the problem is that there's something in the map that the server cannot load for you.
For example, if your map lists a particular reactor that you're missing from Reactor.wz, the game will not be able to find it, thus that error will appear.

Now, what you need to do is check if your HHG1 map has some elements that aren't included in the other files: NPCs, reactors, objects, and so on.
Since a clean v83 installation should definitely not have these issues, did you modify some maps, in your server? Like, did you attempt to add or remove things?
One of them will be what's missing from the Hunting ground, we just gotta figure out which.
 
Upvote 0
Newbie Spellweaver
Joined
Apr 16, 2018
Messages
25
Reaction score
0
Aha...

I see, I did attempt to modify HHG1 and I was able to successfully modify it and actually see the changes (All I did was add extension to the floors)

Other than that, I used "!pmob [ID] [time]" to spawn mobs nothing else..

So, I will do what you said.. and if I was able to successfully solve the problem I will tell you,

PS: Still I am not familiar with reactors so I didn't really miss with them



UPDATE:
So, I did put the original map.wz [I had back up] the problem still exists
I will still try to find out what's wrong with itThanks..



Eh

So I got a clean Maplestory V83 folder
I got also clean src, scripts, wz, dist

Is this insufficient to solve the problem?



Okaii

Looks like the out-of-memory and the HHG1 are related,

So I tried to use a portal to go to HHG1 I couldn't of course, I kept the server on and after sometime, I checked the CMD and I received the OutOfMemory error (As shown in the original post spoiler)

What do you think? *Now this shows that the OutOfMemory problem is related to HHG1, which is as well as why I can't warp to it*
 
Last edited:
Upvote 0
Junior Spellweaver
Joined
Sep 16, 2017
Messages
156
Reaction score
36
Other than that, I used "!pmob [ID] [time]" to spawn mobs nothing else..
This may be your problem, actually.
Looking at the source, the command pmob inserts the new monster to spawn in the database table "spawns"; this same table is queried when loading a map via getMap (MapleMapFactory.java, lines 145+).

My suggestion is to manually remove the custom mob spawns you added to HHG1 from the database, and then to launch the server again to test.
 
Upvote 0
Newbie Spellweaver
Joined
Apr 16, 2018
Messages
25
Reaction score
0
wow.... You're totally right :/

Okaii what do I do then? Because the map has no mobs like this

Is it like limited amount I can put only? or what do you suggest?
 
Upvote 0
Junior Spellweaver
Joined
Sep 16, 2017
Messages
156
Reaction score
36
That method theoretically works; it's equivalent to adding monsters to Map.wz, but it's easier to perform.However, you need to be extra careful with how you set the values, especially platforms. One mistake could render the map unusable.
I'd suggest you to use HaCreator, that will let you edit any map element (mobs included) in a simple and complete way. c:

As for the out-of-memory error, it's possibly due to some missing safe disposal of elements when warping goes wrong. It's worth investigating and fixing.
Did you notice it happening at other times, too? Or did it only happen when you faced the portal issue?
 
Upvote 0
Newbie Spellweaver
Joined
Apr 16, 2018
Messages
25
Reaction score
0
I’ll try the HaCreator thingy

for the out-of-memory, it is only when I tried the portals leading to HHG1. So your reasoning makes sense.

thanks a lot :)
 
Upvote 0
Back
Top