Sometimes client loses response from server

SergiySergiy
edited April 2014 in Flash (deprecated)
Hi! We're using Photon with flash for our games for last 3 years, everything was fine, but our last game is very request/response intensive.
What we figure out, that sometimes (very rarely) request is sent to server, but no response on client side, what is quite strange, because we're using our custom operation "Ping" to detect disconnects, so when I started analyze log files, I can say for sure, no disconnect was at that time and events from server were received timely.
Where can I search for a problem? Any idea?

Comments

  • Hi,
    Which Photon sdk version and which component (plain Photon or Loadbalancing) do you use . Server is Photon Cloud or your own?
    What type of request is in question? No response on that request or broadcasted events lost?
  • * Photon Fl SDK v3-2-1-4
    * Our own server
    * No response on that particular request
    * Broadcasted events aren't lost, AFAIK
  • You definitely should check server logs to find out if server receives request and responses properly.
  • Yes, server receives request and sends responses properly, but very rarely client loses server response.
  • Then I suppose that client receives packets but skips them for some reason. Some low-level logging can be on using code:
    [code2=as3]import exitgames.photon.internals.DebugOut;
    ...
    DebugOut.getInstance().setDebugLevel(true, true, true);
    DebugOut.getInstance().setUseTrace(true);[/code2]Please call it after peer created (e.g. after joining/creating room in loadbalancing), since peer constructor resets debug level currently.
    Check if lines like that are in flash trace log: "found byte in buffer: XX and ignored...".
    After reviewing peer code, I see only that possibility for client to skip data.
  • Ohh cool! But is it possible to get all this debug info not in console, because I need to save it to text file?
  • I think this can help:
    http://helpx.adobe.com/flash-player/kb/ ... layer.html
    Also you can try debug versions of browser flash plugins.
  • SergiySergiy
    edited April 2014
    This is not exactly what I need :(
    How I can save DebugOut- trace output to the txt file? Is this possible?

    This is very rarely problem, maybe once per 1000 games.
    We had no luck to catch this "bug" in our office, that's why i need somehow save trace log to txt file on clients PC and send to our server.
  • It's possible with debug version of adobe flash player or debug version of browser plugin.
    Can you please explain what exactly do you need and why debug player is not an option for you?
  • Because game is in production already, I cannot ask clients to install flash debug version.
    That's why we're sending our debug reports in case any problem to our server from client app.
    So, that why i want to save DebutOut log file to log file and send to our us for analyze. Is it possible to get DebugOut traces not in consloe, as events or String objects?

    For example, today we had one problem, here is the received log info:
    17:59:21:283 |REQ (GET_HISTORY) :=> 21,0,77,13,32,true,
    17:59:21:491 |REQ (GET_MATCHES_LIST) :=> 62,0,61,1,60,1,12,0,
    17:59:21:735 |REQ (GET_HISTORY) :=> 21,0,77,13,32,true,
    17:59:22:594 |REQ (PING) :=>
    17:59:23:917 |REQ (PING) :=>
    17:59:25:336 |REQ (PING) :=>
    17:59:26:651 |REQ (PING) :=>
    17:59:27:951 |REQ (PING) :=>
    17:59:29:291 |REQ (PING) :=>
    17:59:30:591 |REQ (PING) :=>
    17:59:31:891 |REQ (PING) :=>
    17:59:33:191 |REQ (PING) :=>
    17:59:34:491 |REQ (PING) :=>
    17:59:35:792 |REQ (PING) :=>
    17:59:37:118 |REQ (PING) :=>
    17:59:38:416 |REQ (PING) :=>
    17:59:39:749 |REQ (PING) :=>

    As you see, client sends pings request every second, but on server side we hasn't received anything, but client is online.
    It happens very rarely, maybe once per 1000-2000 games, when client is online, but we're loosing requests from client..
  • Sergiy wrote:
    So, that why i want to save DebutOut log file to log file and send to our us for analyze. Is it possible to get DebugOut traces not in consloe, as events or String objects?

    What console do you mean? I think traces are just truncated in release client.

    One possible options to get logs is usage of LocalConnection. I will check if it's working later.
    So far i can show client code logging in that connection.
    [code2=as3]var lc : LocalConnection = new LocalConnection();
    lc.addEventListener(StatusEvent.STATUS, onStatus);
    lc.send("_xmlDebugNeutronComponent", "showText", addTimeStamp(debugText));
    ...
    var lc : LocalConnection = new LocalConnection();
    lc.addEventListener(StatusEvent.STATUS, onStatus);
    lc.send("_xmlDebugNeutronComponent", "showRequest", addTimeStamp(str));
    ...
    var lc : LocalConnection = new LocalConnection();
    lc.addEventListener(StatusEvent.STATUS, onStatus);
    lc.send("_xmlDebugNeutronComponent", "showResponse", addTimeStamp(str));[/code2]
    Possibly 2nd swf running on same machine can intercept those calls.
Sign In or Register to comment.