Odd HttpSocket behavior

  1. 4 months ago

    Lars L

    Apr 26 Pre-Release Testers, Xojo Pro Europe (Germany, Chemnitz)

    Hi,

    one of our applications got a huge update during the last weeks, where we implemented multiple third-party-APIs. To communicate with these apis we use httpsecuresockets (of course).

    There's no magic inside, there are just plenty of them in some operations. The sockets it self are working properly, we have no error or exceptions.

    We have about 10 users online parallel and if they use those new functions with the bunch of sockets, we observed the odd behavior, that the session crashs and the browser refreshs the page.

    We also observe this in another instance of the application, which still on an older version, but since we updated one instance, the other shows the same problems while working with sockets.

    We compile using Xojo 2018 R4 (19 R1 is not usable yet, they !@#$% up the whole socket thing).

    We increased the number of maximum SecureSockets from 400 to 1000, which seems to make the apps more stable.

    Does anyone experience the same behavior? What could be a way to inspect or to prevent those session-restarts?

  2. Lars L

    Apr 26 Pre-Release Testers, Xojo Pro Europe (Germany, Chemnitz)
    Edited 4 months ago

    Additionally:
    This is our JS console right now oO
    -image-
    https://github.com/VanDerLars/upload_stuff/blob/master/Bildschirmfoto%202019-04-26%20um%2010.15.27.png

  3. Greg O

    Apr 26 Xojo Inc

    A 502 HTTP error is Bad Gateway which means that the upstream server (the web app in this case) sent a bad response.

    we observed the odd behavior, that the session crashs and the browser refreshs the page.

    Are you sure that it’s crashing just the Session? Given what I wrote above, I’d bet that the entire app is going down and getting restarted.

    Have you implemented App.UnhandledException and returned True there to keep that from happening?

  4. Lars L

    Apr 27 Pre-Release Testers, Xojo Pro Europe (Germany, Chemnitz)

    @Greg OLone Have you implemented App.UnhandledException and returned True there to keep that from happening?

    Hi Greg,

    Yes, we implemented it. We also implemented an error log when this event is fired. But the crash logs are not really useful.

    @Greg OLone Are you sure that it’s crashing just the Session? Given what I wrote above, I’d bet that the entire app is going down and getting restarted.

    Can a webapp start itself again while running in standalone mode? I thought this was not so?!

    If not then just the session shuts down. We also observe, that not every user is kicked out every time.

    When the app itself crashes, then another application on our server restarts the app within one minute, that is mostly not the case.

    @Greg OLone A 502 HTTP error is Bad Gateway which means that the upstream server (the web app in this case) sent a bad response.

    These errors are just randomly popped up. We see the behavior also, when the js console doesn't look this.

    Thanks for your help man!

or Sign Up to reply!