Avery
Avery

Reputation: 1

Delayed server responses when logged in to wordpress admin on one browser (any browser!) for a while

This issue sounds kind of ridiculous, but I’ve pinned it down as best I can and ruled out anything obvious.

When I’ve been logged in as admin and working on my site in a browser for a while (“a while” is variable, but maybe half an hour to a few hours), it starts to get extremely slow to load any public or admin page. Using developer tools I can see that the slowdown is caused by huge delays in “waiting for server response” – up to 60s for even small and simple resources. This means a single page can end up taking several minutes to load, and sometimes the browser gives up entirely and times it out.

But these server delays are localised to my current login. I can fix the delay locally by:

Here’s a recording that shows the homepage taking over two minutes to load in chrome, then immediately switching to a firefox window and loading the same page in a few seconds. (Note again, this issue is not specific to chrome, it is specific to whichever browser I have been logged in on and using). https://streamable.com/qadvcy

Things I’ve ruled out:

And an additional factor: I have two separate wordpress installs on the same shared hosting, one as a subdomain of the other. They both display this same issue. And I think (but am not 100% certain yet) that a local slowdown on one usually or always causes a local slowdown on the other.

I just have no idea where to go from here. I'm not even sure whether this question counts as on-topic here, because I don't know if it's a programming problem or not.

What could be causing this, and how can I fix it?

Upvotes: 0

Views: 84

Answers (1)

Veppa
Veppa

Reputation: 1

Slow WordPRess admin when switching browser can be related to Browse Happy API checks. WordPress checks user browser to make sure that admin area User Interface is fully functional for your browser. It is very old way of checking for not compatible browsers.

Usually these check sare fast like 1 second. But temporarily it may get slow or your web server may have some network problem.

To isolate problem and to make sure that it is related to API calls (external requests made using WP_HTTP) instal either:

  • "Query monitor" plugin to view exactly why page is slow while you are viewing pages. it shows database, plugin, WP_HTTP usage.

  • "HTTP Requests Manager" plugin to log all WP_HTTP requests with request time and total page generation time. It will record on all pages even if you log out or switch browsers. If it is Browse Happy API issue then you can block it selecting "Smart Block" mode. Additionally it block self pings, enclosure checks, any external request on slow pages etc.

I had similar issue when I first login to admin or when I edit couple posts my WordPress will become very slow. Sometime it will show 504 error. "Smart block" fixed my issue.

Regards.

Upvotes: 0

Related Questions