My website was loading very slowly and it went down and up the whole of today and I suspected it is a DDoS attack.
I installed Cloudflare and bought the $20 monthly plan, changed my dns name servers and activated firewall. My dashboard shows “Good news! Cloudflare is now protecting your site”.
My site only receives about 100 unique visitors a day on average. So all these requests are abnormally highly
This is the reply from my hosting provider:
"Please note that shared hosting plans have a concurrent PHP process limit of 25 per cPanel account. If a site exceeds the process limit, the site will face performance issues.
Checking the logs we see that the account exceeded the process limit 465 times in the past 24 hours. You can check the logs below:
Please note that all sites in your shared hosting package share the same resources. The limit is set to prevent abusive usage of resources so that one package does not hamper the performance of other packages."
With about 3000 unique visitors a month, I am unsure if getting a VPS is the solution to this problem?
For starters, try this page rule to cache the home page. That should free up your server a bit, assuming most of the traffic is aimed at the front page. Your server logs or analytics should show where the most traffic is headed.
Ah, you’re on the Pro Plan. Great News! You can use APO (Automatic Platform Optimization) and forget about my page rule.
APO does intelligent caching of WordPress sites. Your /shop looks like a completely different software installation for ZenCart, so I’m not sure how well APO will avoid caching for that section. I think APO relies on WordPress headers to cache pages, so without those headers, your ZenCart /shop should be safe from improper caching.
I also suggest you create a Page Rule (make this one First). It will let Cloudflare do the redirect to ‘www’ so those hits won’t put a load on your server. The $1 just forwards the * part of the initial request as well. You can leave it off if you’d prefer.
That makes the redirect and the main page super fast, but the rest is dragging. Give APO a try. It’s free since you have the Pro Plan. Toggle that Rule #2 off so it doesn’t interfere with APO.
/shop is going to be a huge struggle. A 25 PHP process limit is going to kill your performance. It also doesn’t bode well for the server in general if they’re being that restrictive on resources.
I took a look at the log at privatebin and it looks like almost all the overages are due to the site’s home page. Your current Page Rules should alleviate that, but it’s quite possible that the server just isn’t up to handling ZenCart.
Beyond all this, there’s nothing Cloudflare can do to speed up your site. It’s all dynamic data, and eCommerce can’t use Full Page Caching for shoppers. I really don’t think there’s a way around this without getting a better hosting plan.
Averral - is your site hosted on HostGator by any chance? I am asking because I am experiencing a similar issue with exceeding the 25 process limit on HostGator so had to turn off CloudFlare. Strange thing, when ClouldFlare is turned off, my site works just fine.
Try a “Purge Cache (Everything)” from your Overview tab at dash.cloudflare.com
APO is looking for headers from the Cloudflare plugin, and the cached homepage may interfere with that. It also times out after 5 seconds, so that’s also a problem if your home page isn’t cached.
It could just be timing out because the site is so slow. Open a ticket and see if they can get it to work.
To contact Cloudflare Customer Support, login & go to https://dash.cloudflare.com/?account=support and select get more help. If you receive an automatic response that does not help you, please reply and indicate you need more help.