+ Reply to Thread
Results 1 to 4 of 4

Thread: Server responding to slow to client message

  1. #1
    Junior Member
    Join Date
    Jul 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Server responding to slow to client message

    We're running a multiple player game system. The client keep connection with server by sending an "alive message" every 50 seconds. On server we run a schedule to check and after 60seconds without "alive message", user client will be kicked. But sometimes the client sent the "alive message" but the server does not receive or response to that message. And the client is dropped. Here is Electro log :

    "2012-Jul-20 00:31:25:984 [pool-1-thread-4] INFO com.electrotank.electroserver5.entities.PeopleImpl - Client dropped: 103135762137295
    3450 2012-Jul-20 00:31:25:988 [openclose] INFO com.electrotank.electroserver5.entities.PeopleImpl - Client dropped: 103135762137295
    3451 2012-Jul-20 00:31:25:988 [pool-1-thread-4] DEBUG com.electrotank.electroserver5.entities.PeopleImpl - ConnectedUser{45780 (103135762137295)} has [] clients
    3452 2012-Jul-20 00:31:25:988 [pool-1-thread-4] INFO com.electrotank.electroserver5.entities.PeopleImpl - User dropped registry connection {}
    3453 2012-Jul-20 00:31:25:989 [pool-1-thread-4] INFO com.electrotank.electroserver5.entities.PeopleImpl - User dropped 45780 (103135762137295)
    "
    Can you tell me the reason for that bug? Is that because of server not responding because that time there are too much message sent to it? We are thinking to remove the keep "alive message" because of this problem.

  2. #2
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,086 Times in 1,075 Posts
    A keep alive sent every minute works well in my experience if the client idle timeout period is two minutes. Ten seconds may just be too short. In the Hangman example, the plugin sends a heartbeat message to the room every 30 seconds and expects to get a reply back immediately; if it hasn't gotten one by the time the next heartbeat message is sent, it kicks that user.

    Things to consider:
    • What garbage collection are you running on your server? The wrong one can cause performance to not be smooth.
    • What version of ES5 are you running on the server?
    • Which client api are you using? (language, version)
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  3. #3
    Junior Member
    Join Date
    Jul 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    *I dont know how to see what kind of our garbage collection on my server, can you tell me how to do it?
    *I'm using ES 5.2.3 on Linux.
    *Client API is Flash and iOS, both got problem with the heartbeat. It is very rare to got these bug.

  4. #4
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,086 Times in 1,075 Posts
    There's a known bug with older versions of ES5 where (very rarely) the server would stop processing requests from a particular client. Try upgrading both your server and client to the latest version of ES5.

    I do suggest having more than a 10 second window. Sometimes when I'm playing games on a Windows box, the operating system decides to do something else and it can be 5 seconds or more before it gives control back to the game I'm playing, which then has to catch up on a lot of things. Grrrrr.....

    If you did not specify any garbage collection scheme then odds are good you aren't using one that is concurrent. See ES5 Stops Responding for info on how to set a good one.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

+ Reply to Thread

Tags for this Thread

Posting Permissions

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