Traffic causing a site to slow down? we had a similar issue and how we fixed it

Written by Rich Steedman

The Issue

So at the start of last week we encountered a bit of an issue, I will give you some insight into what happened; we have our own server – the basis for hosting our sites and providing customers with security certificates (SSL), on Sunday night and Monday night one of our sites was being hit by an unexpected amount of traffic and was actively being updated and tweaked. All of this extra traffic caused the site to go slow and occasionally crash.

Well our reaction wasn’t quite that bad.

Now obviously this was a bad thing, we want our sites to be as robust as possible and for them to handle as much of a battering as possible, but we could also draw some positives from hosting the site ourselves such as; we were able as soon as there was an issue to restart the processes causing the site to crash, this kept the site online when it needed to be (all be it running slower than normal), if you were using a hosting company this would likely not be the case and if you were experiencing an issue (which does happen) it would probably just be a case of submitting a ticket and waiting. Another positive is; it’s an issue we can fix (which I will go into more depth on later) this might differ from a large hosting company, they will see their service as what you pay for is what you get, and won’t be changing it just because you’ve experienced difficulty.

The Fix

We can also improve, since the issue we have already started to put some systems in place to make the sites more robust in dealing with a higher spike of traffic.

  1. We have used some image compression techniques to try and bring down the amount of image data being transferred without affecting the quality
  2. Cache in nginx – this sends out saved (cached) versions of the pages to save them coming from the base of the server.
  3. Cached pages in a wp-plugin – This plugin caches the results of sql so the page does not have to hit the database every time on view.
  4. Minified the css / javascript files – reducing the size of the css / js files to reduce the amount of data loading onto the pages
  5. Using a service called cloudflare to serve some of the pages
  6. Upgraded certain services
  7. Reconfigured PHP to load dynamic children

This will make the site more reliable and once everything is fully in place we shall be testing
the site to make sure that it can handle the previous amount of load that caused last week’s issue, and more.
The site in question although it was running slow still managed to turnover a great amount of revenue over the course of the two nights, and even with the high amount of traffic all of the customers were able to still make purchases.

If you have experienced issues with your site in terms of it’s speed or stability due to the increase in traffic or any other reason hopefully some of the above might help lead you to a solution or if you are still struggling just drop us a message, either through the site, email: or on facebook, instragram or twitter.

Be sure to follow us on youtube, where you can watch our weekly Vlog.




Submit a Comment

Your email address will not be published.

sixteen + twelve =