Cloudflare slowing my site down causing it to timeout

Cloudflare slowing my site down causing it to timeout

Share on social media

Cloudflare is a popular CDN, or content distribution network, which comes bundled with my web hosting package.

I’ve been using them for a couple of years.

No problems.

Last week, I suddenly found I was no longer to create new posts in wordpress.
None of the tool panels were rendering. I was not able to see the java applet window that I’m currently typing in. The user interface was basically busted.

Wordpress New post UI - No toolbars, no text entry area
WordPress New Post UI

I wrote a little message to WordPress.org, who are helpful and informative, explaining that my WordPress interface was no longer working.

WordPress caching errors

I thought it might be a caching problem.

Often when you’ve found a solution to a problem on a modern website that leverages caching to speed up delivery, you won’t know the problem is solved because the old version of the site along with the old errors will be served up to you.

You have to do a HARD REFRESH on anything from the old rendering of the site, (all old pages, cookies sessions, etc.. anything must be CC cleaned out of there, and started afresh).

That worked, I went off and left the site, did the other things for the day, (paint the boat).

Cloudflare CDN causing site to slowdown and timeout

Following day, checked up. The problems started again. I was unable to see any aspect of the new post screen, and I was getting 2 seconds to first byte, and about 18 seconds to render fully.

In reality, and to any visitor, the site was actually timing out.

I then began to look at Cloudflare, which I had turned off to do the initial cache purge, but then turned back on again. I guess because I trusted them NOT to be the problem.

That turned out not to be the case.

Cloudflare are the problem.

QED

I tested this theory again today.

Today has been 5 days since I’ve turned Cloudflare off.

The site has been working fine.

The WordPress Autoptimize caching has been working overtime to try and keep up with all the requests, but otherwise fine.

Enough time to settle down. Be normal.

Carry out a test.

Cloudflare CDN
Supercharge?

Turned Cloudflare on this morning.

  1. Objects not rendering: ANSI Chars refusing to render
  2. Pictures not rendering: JPG’s not rendering, not being served up
  3. 8 Second plus wait for first Byte: Slowing the site down to the point it takes anything 2 to 10 seconds before any information whatsoever is received from the CDN.
  4. Site timeout: When your browser has to wait too long for a site, it effectively judges the site to be ‘down’ and serves you a ‘time-out’.

Cloudflare support

I’ve written a message to Cloudflare support informing them of the fact that the CDN is disabling my site.

I await their reply….

Reply from Cloudflare support

Here’s the reply:-

Alex T.(CloudFlare)

Aug 20, 1:28 PM BST

Hello,

If you’re seeing slowness, a useful tool to use to share data with us is a speed test site like webpagetest.org — to do this you should run a test with CloudFlare and a test direct to your server as a comparison.

Testing with CloudFlare:

  1. Make sure CloudFlare is enabled for your domain
  2. Visit http://webpagetest.org
  3. Choose a geographic location and a browser that matches as closely as possible to that of your visitors experiencing the slowness
  4. Enter an example URL and click Start Test. When it is complete save the result URL to share with us.

Testing direct to your origin server:

  1. Pause CloudFlare like so: https://support.cloudflare.com/hc/en-us/articles/200169176-How-do-I-temporarily-deactivate-CloudFlare-
  2. Visit http://webpagetest.org
  3. Repeat test as above

When both tests are complete, send both URLs over to us so we can take a look.

I did the tests, as recommended. Here are the results from both tests.

Test 1: Without Cloudflare

Webpagetest page timing waterfall
Webpagetest page timing waterfall

7 seconds to render, 1.859 seconds to first byte

Test 2: With Cloudflare

Cloudflare webpagetest waterfall
Cloudflare webpagetest waterfall

18 seconds to render, 1.81 seconds to first byte.

As you can see, some very routine elements such as jpg’s and png’s housed on my own server are slowing the load down.

Ontoplist.png 92ms without CLoudflare, 15070ms with cloudflare. That’s really eye watering for a 120×88 png.

Upshot

As you can see, Cloudflare CDN currently slows my website down by 11 seconds.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.