1

I work on a web application which gets push type updates from a rest server using a long polling technique.

It runs setTimeout() which executes a function which does a xhr GET request with a timeout of 120 seconds. It also sends the server a special "Accept-Wait" header of 60 seconds, which tells the server when to reply with a 200 and no data for the client. Then the client repeats this setTimeout. This continues forever while the client is "logged in" to the server.

I have a user using Chrome (he is only able to use Chrome so I haven't verified if this is reproducible in other browsers since no one else can reproduce this problem) who when he minimizes, the GET requests start timing out. This looks to my longpoller like the server is down.

I have enabled debug on the rest server and confirmed that it has nothing from this user for 2mins (seeming to indicate the GET requests aren't getting out of the browser). I have also watched in the Chrome terminal (F12) "network" tab, that the requests are "cancelling" at 2mins, indicating they are timing out. This problem also reproduces when using "localhost" which I think rules out network issues.

How can I get more information about Chrome regarding why it isn't letting http traffic out for this user?

Thanks

  • Is it resolved? – Anish Chandran Jun 15 '17 at 09:55
  • No... In fact, I traveled to visit the customer on site and pursue the issue further, but when I arrived, they could no longer reproduce the problem. I believe it was a network issue or even some network security issue that was resolved in parallel to my troubleshooting. – Russ Stratfull Jun 16 '17 at 11:39

1 Answers1

0

If this issue happens only in google chrome, maybe it is discarding your tab, you can prevent it by disabling a flag, type the following url on adress bar and see if it is enabled:

chrome://flags/#automatic-tab-discarding
Marcus Vilete
  • 210
  • 4
  • 8
  • Unfortunately, that was not it. They have this disabled. In fact, I wouldn't have assumed the longpolling timer would timeout GET requests if it was because of this. – Russ Stratfull Aug 18 '16 at 19:14