Site takes 10s to load; anybody worked with CloudFlare?

The site I am responsible for is loading really slow in the target market - nothing appears up to the 5th second, then something loads, disappears and comes back again, basically taking a whopping 10 s to load the homepage.

Can anybody help with solutions?

Thank you.

PS. Has anybody worked with CloudFlare? I’ve been trying to get it work with intermittent success, basically half the world will see the site, then they’ll see an error 522 message, than it would become visible to the other half. Host provider says all CloudFlare IPs are whitelisted and no problem on their side. CloudFlare says problem on host’s side. Go figure. The site was down a lot of time during the last 5 days. If you have had any success setting up CloudFlare, please share.

I use cloudflare and have received that error, 522. Just the same!

The reason was server aka host. The requests are happening all same time and your site can not handle that much traffic. Change some settings in your Apache or Nginx to handle. Check site error logs and you will see rejected traffic or site crashes.

Not a cloudflare issue. Site / Server / Host setup is the cause.

For me, I reinstalled my server from scratch and now have no problems.

I use Cloudflare as well, and have had this 522 error too.

Just like the previous poster, it was my web host. But it wasn’t the server itself, although I have some issues with that I need to address. The problem at that time was that they had an outage. Once the outage was resolved, the error went away.

One thing you should consider is caching as much as you can at Cloudflare, if possible, so they can serve your files if there’s an issue with your web host. How much you can cache will depend on the dynamic nature of your site, so you need to take that into account. The more static content you have, the easier it will be.

Something else to consider is the host server itself, like the previous poster said. If this is an ongoing issue, you want to take a look at the performance of the server itself. If you have no issues from some locations at the same time that the locations you reference above are having issues, you want to take a look at the network path being taken to your site from these other locations.

I’ve not run into this particular issue with Cloudflare, where the site is working from one location and not working at another location at the same time, but you’d want to verify that nothing is blocking Cloudflare to your host. While the host might have Cloudflare whitelisted, maybe everything in that path doesn’t.

You may also want to look at your DNS settings in Cloudflare. If nothing is getting blocked along the path, Cloudflare not being able to get to the same site from different locations suggests a potential DNS resolution issue. So make sure everything is configured in Cloudflare’s DNS settings correctly.

Hmm… nobody cares more about your site than you do. That certainly includes cloudflare. Personally, I don’t use it. I do use CDNs for sure, but oldschool ones like MaxCDN and Amazon Cloudfront, and I use them to do the heavy lifting. That leaves me with a server just to do the clever stuff on, and not a proxy to it ( as you have with CF ).

This makes using this site ( for example ) a worthwhile process, as the TTFB you’re getting returned is a real value, not your server + CF proxying, and changes you make to improve things on your server.

Just as an aside, your audience is - bu the look of it - the Middle East. Testing from India over a 3G link is not going to provide you with particularly meaningful stats.

Do the CDNs you use have Points of Presence in the Mid East? CloudFlare lists 4 in the Gulf region.

Anyway, CloudFlare works now for the last 10 hours. It was some DNS settings that had to be changed.

But it looks like page speed is worse now.
Load time:
First View 107.612s !!!
Repeat View 29.973s !!!

Thank you for trying to help me out.

It was the DNS settings that had to be changed inside CloudFlare. The firewall on the server was also rebooted.

Thanks for trying to help me.

It was the DNS settings I had to change, plus firewall on the server restarted. Now, it works but the speed I see here is anything but amazing:
Looking at Console Log

It looks like it can’t load Google Analytics and the other stats on the site. Does that mean the stats will not be correct? How can I fix that?

@Paggioni. Don’t be dismissive of options offered. They may just have been the distillation of decades of experience. To answer your questions… go find out. If you wish to continue with a service that you think is right for you, but delivers 100s+ delivery times, then maybe web delivery isn’t for you (:

Start your testing/tuning with something other than the real carrier cell networks. I wouldn’t be surprised if the Vodafone link was running extremely slowly and 100+ second load times are sadly normal (even on the good side) for bad 2G connections.

I would start with the 3G or “Fast 3G” throttling on one of the desktop locations with Chrome running in mobile emulation. That will help identify hosting/serving issues (heck, even running much faster would be useful for that).

Testing on real carrier networks can be useful but they vary so much and can be so insanely bad that I wouldn’t recommend starting there.

I use cloudflare and have received that error, 522. Just the same!
I check my site for error and observed that due to heavy database query database server was not able to handle it on shared environment. I have tune the way query runs and after that seems less issue.

–P J