Odd sequence of events

All Union Platform questions, comments, feature requests, and bug reports.

Odd sequence of events

Postby toby » Fri 05 Jul 2013 15:40

If some server or room module code takes a long time, can that cause problems?

Here is roughly the sequence of events:

17:00:53 a game ends invoking some room module code (* see below)
17:01:03 Player 1 (client 2269) in the room issues a chat message (1)
17:01:09 Player 2 (client 2249) in the room leaves the room and the server (possibly voluntarily, possibly not)
17:01:39 Another client sends Player 1 a private message

17:01:58 The user who was 2269 logs in again as 2295, having seen a disconnection message.
This results in 2269 being removed (sort of)
17:02:17 The same user logs in again as 2296.

17:02:30 A message in the server log indicates that the server finished
. ... . . . .. doing it's "end of game" functions. (* see below)
17:02:30 The chat messages issued by 2269 show up on other clients screens (from (1) above)

Other odd things happen at the same time:

There are also some messages in the log for 2249 and 2269 saying
2013-07-05 17:02:30,031 WARN - A message to clients with message [CLIENT_HEARTBEAT] from client [2269] specified a client that wasn't found [2269].
2013-07-05 17:02:30,202 WARN - A message to clients with message [CLIENT_HEARTBEAT] from client [2249] specified a client that wasn't found [2249].

There are ROOM_ATTR_UPDATE messages still referencing 2269.
2013-07-05 17:02:30,030 DEBUG - Server sending to client [2296] message [<U><M>S2C_ROOM_ATTR_UPDATE(u9)</M><L><A><![CDATA[Players.006]]></A><A>2269</A><A><![CDATA[gameon]]></A><A><![CDATA[0]]></A></L></U>]

Note that this is sent to 2296, the second replacement of 2269.


* note about "a long time".

What is going on is that in the middle of a room module message,
the server issues a (synchronous) network call to another server to record
the game results.

Usually (99.9%) of the time this works fine as the second server responds quickly.
Sometimes it times out, or responds unfavorably, but I can handle that.

Here it seems simply to have taken something like 90 seconds to respond,
which seems to have caused some grief.

I would appreciate comments and advice about this to avoid this situation in the future.
toby
 
Posts: 162
Joined: Sun 24 Jun 2012 14:18

Return to Union Platform

Online

Users browsing this forum: No registered users and 1 guest