Jump to content

[9935] ACE Realmd Netcode


Recommended Posts

Posted

Hello,

I would like to present for preview a patch for making realmd use ACE framework instead of the old sockets library for networking.

[EDIT] The patch is already commited in mangos

Posted

I tested this patch, works fine.

But there are comments:

If you connect more than 2000 people simultaneously realm server stops allowed connections, this is not freeze, and when the number connections to about 1000 people, realm server again begins to function normally.

Another problem, if you enter the game, and then go out and seek realm list, they will all be offline.

OS: Linux Debian 5.0 x64

ACE 5.7.6

Posted

Hello,

Thanks for reply

here is answer for the reports:

1) Are you sure you have ulimit -n properly set ? If ulimit -n is set to 2048 or something near, then the behavior is expected, try to increase it.

2) I believe the bug exists both in current mangos implementation in realmd and in the new realmd, here is quick fix for the new realmd (its a hack fix that works only on little endian machines, like yours), for old realmd fix is similar.

diff --git a/src/realmd/AuthSession.cpp b/src/realmd/AuthSession.cpp
index 965c528..c7f1fa5 100644
--- a/src/realmd/AuthSession.cpp
+++ b/src/realmd/AuthSession.cpp
@@ -749,6 +749,8 @@ bool AuthSession::_HandleReconnectChallenge()
    _safelogin = _login;
    loginDatabase.escape_string(_safelogin);

+    _build = ch->build;
+
    QueryResult *result = loginDatabase.PQuery ("SELECT sessionkey FROM account WHERE username = '%s'", _safelogin.c_str ());

    // Stop if the account is not found

Posted
Yes, open files (-n) 4096

Clean mangos realm freeze and CPU use 100% after ~1000 ppl connections in one sec.

Confirmed on actual realmd but with this works fine.

Tested with ~2000 conections at the same second and not freeze for now... appear to works as intended :P

Posted
Yes, open files (-n) 4096

Clean mangos realm freeze and CPU use 100% after ~1000 ppl connections in one sec.

_build = ch->build; - works

Confirmed, still freeze on high population reconnect after crash =(

Debian Lenny and Realmd dedicated server.

  • 4 weeks later...
  • 2 weeks later...
  • 2 weeks later...
  • 4 weeks later...
Posted

I beleive patch system exists from 3-4 years ago. With new ACE realmd, the patch support is the same like before. In development versions of ace realmd, patch support has been temporary disabled, because I had to reimplement it ontop of ace networking.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use