Project

General

Profile

Many canceled requests showing in browser developer tools window

Added by W X over 10 years ago

Hi,

In our application, in the Chrome Developer tools window, we have many requests with status 'canceled' and type 'pending'.

Looking at FormData for those requests we see this:

Request URL: https://XXXXX/?wtd=2usZbr3Tq0jwYv9F
Request Headersview source
Cache-Control:no-cache
Content-type:application/x-www-form-urlencoded
Origin:https://XXXXX
Pragma:no-cache
Referer:https://XXXXX/
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36
Query String Parameters view sourceview URL encoded
wtd:2usZbr3Tq0jwYv9F
Form Data view sourceview URL encoded
request:jsupdate
signal:poll
ackId:1223125180
pageId:0
:

and on the 'Time' column, for these requests, we see around 10s and for the size we see 13B always. (These info can be found in the attached log file and screen shot.)

These requests appear even when no timer is enabled. Can you please help us clarify what they represent and why are they canceled ? How can we prevent them from being canceled ?

Thank you!


Replies (7)

RE: Many canceled requests showing in browser developer tools window - Added by W X over 10 years ago

Note: we are using server push in the WT application.

RE: Many canceled requests showing in browser developer tools window - Added by Koen Deforche over 10 years ago

Hey,

That's server push cancelling the long polling request to either refresh it (because it might be timed out by intermediate proxies) or to signal a client-side event.

There's a rule of thumb that you should have a new request after about 50s because a proxy might silently drop your long polling connection.

Regards,

koen

RE: Many canceled requests showing in browser developer tools window - Added by W X over 10 years ago

Hey,

What is the interval at which WT cancels the long polling requests by default to ensure that they are still alive (refreshing them) ? Is that a configurable setting ? (according to the attached logs that would be 8 to 10s).

For the second case of cancelling long polling requests, on a widget having an active timer, in accordance with your explanation, the cancelled long polling requests have the 'Time' column in the developer tools log equal to the timer resolution (please see the attached image) which in my case was 33 ms. When exiting the widget, the 'Timeout' column for cancelled requests comes back to 8-10 s.

When using more than 1 timer with different timer resolution for each, should we see canceled requests with different values in the 'Time' column, each value matching the resolution of each timer ? According to my observation the 'Time' column has the value of the lowest resolution timer.

To avoid this issues, should we switch to using WebSockets (as recommended here: http://redmine.emweb.be/boards/1/topics/7503?r=7535)? Were there any changes made in 3.3.1 release w.r.t. WebSockets?

Thank you!

wt_bdevtools2.png (232 KB) wt_bdevtools2.png Timer active 33 ms

RE: Many canceled requests showing in browser developer tools window - Added by Koen Deforche over 10 years ago

Hey,

The standard timeout is 50 seconds, this can be configured in the wt_config.xml file: server-push-timeout

But if you have your own timer events (or any other client-side events) then the connection is cancelled too. So the 8-10s you see should be caused by other events (not the built-in timeout).

When you have multiple events then they will simply all go off at their interval and cancel the connection to transmit a client-side event.

Using websockets indeed improves this information since it has a built-in hartbeat which doesn't requiring closing the connection. Nothing particular changes in 3.3.1 w.r.t. our WebSockets implementation --- why are you asking?

Regards,

koen

RE: Many canceled requests showing in browser developer tools window - Added by W X over 10 years ago

With 3.3.0 we had some crashes when we switched to WebSockets and the client UI updates were very slow.

We are still looking at these issues and planing to try 3.3.1 to check whether it is something wrong in our code.

RE: Many canceled requests showing in browser developer tools window - Added by W X over 10 years ago

Just checked and we don't have any other event that is signaled at around 10 seconds.

Could it be something internal to WT - like session keep alive? In our case the session-timeout is set to 20 seconds and I think in WT code this is divided by 2.

RE: Many canceled requests showing in browser developer tools window - Added by Koen Deforche over 10 years ago

Hey,

Yes that's it. We do keep-alive at timeout/2.

Regards,

koen

    (1-7/7)