Page 1 of 2 12 LastLast
Results 1 to 20 of 27
  1. #1
    Raymond is offline Member
    Join Date
    Jan 2010
    Posts
    32
    Rep Power
    0

    Default Java Stablility - Help

    Hi,

    I have a emulator in Java for a online game and the stability is bad on it. How could I increase the server stability and performance?

    It uses JRE6, JDK (Newest version with JRC files). Basically there is a world/login/channel server and they use XMX- to force RAM. Each .bat file runs of e.g. gameserver.jar.

    PM me for the source codes.

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    5

    Default

    it's most likely that if it is crashing, that the code is not well written to handle all possible inputs, such as crashing because something was unexpectedly null. or perhaps some of the game messages are not completely implemented yet.
    Basically, this probably isn't something we could just fix with java vm argument tuning.

  3. #3
    Raymond is offline Member
    Join Date
    Jan 2010
    Posts
    32
    Rep Power
    0

    Default

    The server can stay up for a good 1 day without crashing however its just badly coded on parts only.

    May someone help? Yhere might be deadlocks and etc. Any other ways to force RAM on to the channel server... I use XMX right now.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,950
    Rep Power
    19

    Default

    You are doing the classic "my car doesn't work", and expecting us to be able to figure out why. You have to give us more information. What errors do you get when it crashes? What exceptions? Stack traces?

    Posting the relevant area of code would probably help.

  5. #5
    Raymond is offline Member
    Join Date
    Jan 2010
    Posts
    32
    Rep Power
    0

    Default

    There are no errors its just parts badly coded. Theirs that eat up memory high. Here is 1 error:

    Exception during processing packet: net.sf.odinms.net.channel.handler.SummonDama
    geHandler: null
    No error line.

  6. #6
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Quote Originally Posted by Raymond View Post
    There are no errors its just parts badly coded. Theirs that eat up memory high. Here is 1 error:



    No error line.
    That has nothing to do with "eat up memory high", that has to do with a null pointer exception. And, there is "No error line" because someone caught the exception and printed their own message without enough information to be able to dagnose anything, rather than allowing the stack trace to also be output (at least somewhere).

  7. #7
    Raymond is offline Member
    Join Date
    Jan 2010
    Posts
    32
    Rep Power
    0

    Default

    I dont know how to show you the high memory usuage parts. I can upload you an source?

    Here is one : (SVN)

    XiuzSource - Revision 23: /

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,950
    Rep Power
    19

    Default

    The only outcome of high memory usage is an OutOfMemory exception...are you getting one? If not, then why worry about that?

  9. #9
    Raymond is offline Member
    Join Date
    Jan 2010
    Posts
    32
    Rep Power
    0

    Default

    Can you find me the deadlocks? Deadlocks make the server crash easy. I dont get out of memory error.

  10. #10
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Deadlocks won't "crash" a server either. Just the opposite. It'll live forever, but not do anything.

    It's time you start doing some of your own work. Until you can come back with a real question, about a specific portion of your code, with the exact and complete error and stack trace, and the relevant code, it isn't worth continuing this conversation.

  11. #11
    Raymond is offline Member
    Join Date
    Jan 2010
    Posts
    32
    Rep Power
    0

    Default

    Problem is when the server crashes it wont give me any errors. It's just bad coded.

    My mission is to get the codes to run faster and uses lesser RAM (Memory).

    The Channel server might have memory leaks. Maybe check the code out?

  12. #12
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    If it crashes and doesn't produce an error, then you have empty catch blocks in there swallowing exceptions. You need to fix that, first.

  13. #13
    Raymond is offline Member
    Join Date
    Jan 2010
    Posts
    32
    Rep Power
    0

    Default

    Right, can someone go into that source and pick out some memory leaks? I'll fix them if I can. I'm not good in java memory leaks.

  14. #14
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    5

    Default

    You might have more luck in the MapleStory developer forums RaGEZONE - MMORPG server development forums

  15. #15
    Raymond is offline Member
    Join Date
    Jan 2010
    Posts
    32
    Rep Power
    0

    Default

    They dont help much over there.

  16. #16
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,950
    Rep Power
    19

    Default

    If you don't get an OutOf Memory then you haven't got a memory leak.

  17. #17
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Quote Originally Posted by Raymond View Post
    Right, can someone go into that source and pick out some memory leaks? I'll fix them if I can. I'm not good in java memory leaks.
    Like I said, you have empty catch blocks. Look through the code for
    Java Code:
    catch(Exception e) {}
    or something like that and add a e.printStraceTrace() (or whatever the var is) to that block (all of them), then try again. As I said, clean up the empty try blocks first. I am not going to even think about going through your code and playing compiler, vm, os, and network in one to try and figure out what might be wrong with it when you can go through the code making those simple changes and find out what'w wrong with it, rather than guessing at it.

  18. #18
    Raymond is offline Member
    Join Date
    Jan 2010
    Posts
    32
    Rep Power
    0

    Default

    What methods in java makes it use less RAM and fast performance?

  19. #19
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    5

  20. #20
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Quote Originally Posted by Raymond View Post
    What methods in java makes it use less RAM and fast performance?
    How's the weather on your planet?

    I have no idea why I even try. 90% of the people asking questions here are the same as you (only worse, since they usually get indignant, you just ignore everything). You come here with a predefined idea of what you think is wrong, with no evidence to support it and plenty of evidence to refute it, but you refuse to even acknowledge (or at least act on) any of the advice given you and just come back with different questions to try and massage out an answer that supports your original supposition.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •