“Waiting for available socket” issue on WordPress with Chrome
Published — 2 minute read
I was recently working on a WordPress project where I was testing everything to make sure it worked correctly in Chrome, and I needed to make some edits. I edited the page, and then went back to the main site, refreshed, and Chrome got stuck trying to refresh the page with the message, “Waiting for available sockets” in the bottom left corner.
I was able to reproduce this in the new Microsoft Edge as well.
A quick search revealed a way to clear the socket pools, however this did not work for me. Basically, just go to
chrome://net-internals/#sockets in Chrome or Edge, and click “Flush socket pools”.
Like I said though, this did not work, and the only temporary solution was to restart Chrome and Edge and visit the page again. Obviously this is not good for productivity when testing, and while my default browser is Firefox, I did some more research and discovered this seems to be an issue with the new WordPress Gutenberg editor and Chrome not closing sockets once done.
And again on Stack Overflow:
When I’m using Firefox, everything is fine, no matter how much I hit the save button. Current Wordpress version is 5.2.3, but error occured in former versions too.
I investigated the error, and found it is caused because Chrome never closes the open sockets until I reload the page. So until hitting the button 6 times everything is fine, since Chrome and other modern browsers allow to have maximum 6 paralell connection to a single host. But after I press the button for the 7th time, there is no space for another connection, so Chrome is waiting for the older connections to get closed, but it never happens.
GitHub issue opened #
I’ve opened an issue on the Gutenberg GitHub repo to hopefully bring some attention and a solution.
Update #1 5/28/20 #
This seems to be an issue with WooCommerce upon further inspection. I disabled WooCommerce and the issue went away, however obviously this is not ideal. Updated issue on GitHub.