Where is this "stalled" time coming from? - google-chrome

This is a screenshot of Chrome's network timing and I'm trying to figure out the "stalled" time of ~250ms. Google's docs say the stalled status is for time spent either waiting for a socket (possibly due to max 6 rule) or time spent negotiating a proxy. However, in my case, this is the only active request (so it's not a max 6 issue), and there is no other network activity on the computer or even the network. I'm also not using any form of proxy or VPN.
I eventually figured out that this "stalled" time disappears if I change from https to plain http, so at first, I figured this was SSL setup time. But if that were the case, why isn't it showing up in the "SSL" section of the timing?
What's causing this "stalled" time taking 30% of the load time?
Edit
I had my buddy on the opposite coast hit the same page and it's worse for him, which suggests that it could be server-proximity related?
HTTPS
HTTP

Related

Chrome Queueing Requests

Chrome Timing View
The image above show chrome spends most of the time queuing up the request. I am trying to figure out why that is happening to minimize it.
According to chrome developer documents:
A request being queued indicates that:
The request was postponed by the rendering engine because it's
considered lower priority than critical resources (such as
scripts/styles). This often happens with images.
The request was put on hold to wait for an unavailable TCP socket that's about to free up.
The request was put on hold because the browser only allows six TCP connections per origin on HTTP 1.
Time spent making disk cache
entries (typically very quick.)
Number 3 seems to be the most likely problem according to chrome developer documents but I know that only one request is going out at a time so that can't be it. I don't think it is number 1 either because the performance monitor doesn't show a lag from rendering. Maybe it is either 2 or 4 but I don't know how to test that.
Chrome Performance Monitor
I've included a picture of the performance monitor that shows these long tasks where something is happening in the system. These are also a mystery to me and seem related.
Any help is greatly appreciated!
Edit: It seems you can disable the disk cache when you open dev tools and that didn't seem to fix the problem.

How to solve Chrome's 6 connection limit when using xhr polling

I recently found out that Chrome seems to have a connection limit of 6 ( Chrome hangs after certain amount of data transfered - waiting for available socket ) unfortunately I found this out the hard way by getting a "waiting for available sockets" message after loading up too many tabs (7).
I know it is Chrome since another Chrome user (a.k.a another browser session) loads the web page perfectly fine on the same computer at the same time (I have multiple Chrome users open on my computer). So it is not the server in any way.
I believe this is because, in socket.io (which I am using for notifications), I am xhr-polling which is causing Chrome to have to wait until it can grab a socket from one of those connections before it can process the page.
What is the solution to this?
I have thought of a couple of solutions:
make the xhr-polling window smaller, this increases connections in the browser and node.js but will mean the page won't stall.
Use websockets. I am unsure if websockets are immune to this problem either.
Make connections inactive on tabs not focused. Though it seems other sites don't have to do that...
Use some kind of connection sharing. Considering that Chrome isolates websockets and xhr requests to the tab I do find it difficult to understand how that works.
As an added point: the reason I have not gone with websockets from the start is because I use cloudflare. But if this is the way to solve it then: so be it.
Use a real webSocket, rather than XHR Polling. webSocket connections do not count toward the http connection limit to the same origin.
There is a separate global limit to how many webSocket connections can be created, but it is a high number (200 in Firefox - not sure what it is exactly in Chrome).
Here are some references on this topic:
Max parallel http connections in a browser?
Maximum concurrent connections to the same domain for browsers
HTTP simultaneous connections per host limit… are per tab, browser instance or global?.

Alert visitor that the website may load slowly

Is there a way to alert a visitor that the website may load slowly because of their slow connetion?
i.e.
Heads up!
The page seems to be loading slowly becasue of your connection. Please allow extra time for the website to load.
You may download a known payload using ajax. Note down the request begin time and end time. If that is beyond some threshold you may alert the user about slow connection. For example, you download a 100 kb payload. You know under normal situations it takes 2 seconds. You may alert the user about slow network if it goes beyond acceptable threshold of say, 5 seconds. The payload you download need not be a waste request - you may use any ajax request for detecting the slow connections. This will work with one big assumption - your server is always responding quickly under heavy loads too - indicating only source of slow response is because of user's network conditions.

How does google calculate waiting time and receiving time in chrome?

How does google calculate waiting time and receiving time in chrome network panel?
There are 4 timing categories in google chrome network panel
1.) Blocking
2.) Sending
3.) Waiting
4.) Receiving
I would like to know what all factors are included while calculating these options.
From this link
High "Receiving Time" for HTTP Responses below 500 bytes in Chrome Devtools
an explanation is there for receiving, but I would like to know about all the options in a bit more detail. Can anyone please help me out here ?
It appears that the timing functions may be platform related.
I have an internal web site and the access times reported for the same transactions appear vastly different. For example, my Windows 7 (latest Chrome) shows total response times as 200ms (almost 190ms of receiving) while my Ubuntu laptop shows a total of 4ms on the Chrome Network tab.
I also put timers on my server side first, just to make sure that it was not a delay in my node.js server (running on a different ubuntu box - not the one that has the Chrome client).

SMTP Send Adapter, Errors and Suspended Messages Until Hosts Instance Restart

I've got a BizTalk application that has to send out several hundred, close to a thousand emails over the course of 3 or 4 hours in the morning. The app will run fine for several days, then it seems that the app will slow way down, eventually I will see all of the out going messages in the 'active' state, but not doing anything, just sitting there, with this warning...
The adapter failed to transmit message going to send port "" with URL "". It will be retransmitted after the retry interval specified for this Send Port. Details:"The transport failed to connect to the server.
I don't see any unusual load on the box, no high CPU, disk, or Network utilization.
After I restart the host instance that is hosting this SMTP send port, they all continue and run fine, for a day or two until I have this issue again.
I've been scratching my head on what may be causing this issue... any ideas?
Possibly look for throttling conditions, especially for Memory throttling - (Throttling State 4) - use Perfmon or SCOM on this counter.
Also, in task manager look at the Memory of your BizTalk service hosts - and add Commit Size (i.e. including virtual). It is possible that your Orchs aren't releasing memory or are too memory intensive (e.g. remember to Dispose() XLangMessages in custom assemblies).
If you do find Throttling state 4, and are sure that you aren't leaking, you might want to bump the throttling threshold up from 25 to say 50 - see here. But IMHO 100% as suggested in the article sounds dangerous.