Current time: 03-05-2021, 07:56 AM Hello There, Guest! (LoginRegister)

Post Reply 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Site loads but says timeout?
05-14-2017, 11:14 PM (This post was last modified: 05-15-2017 10:26 PM by dfavor.)
Post: #4
RE: Site loads but says timeout?
Likely you won't like hearing this...

Looks like your problem is a combination of CloudFlare + Magento.

[ ... rant on ... ]

It appears your primary problem is you're using CloudFlare.

CDNs add complexity creating difficult to debug problems + CDNs only help sites which are abysmally tooled... meaning the LAMP stack is untuned (using default config files). Way better to invest in tuning your LAMP stack, rather than using CloudFlare.

First thing I always do with new clients is strip out all CDNs (CloudFlare) + Proxies (NGINX/Varnish) + caching nonsense (memcached).

[ ... rant off ... ]

Here's the problem with CloudFlare.

1) Take a look at these two waterfalls...

Notice they are completely different which means either CloudFlare or your Hosting or how CloudFlare is interacting with your Hosting is glitchy...

Glitchy... tech term for inconsistent times to serve content.

Repeat tests of a site should give somewhat similar results.

2) You can easily see the problems by drilling down on specific assets.

I do this by curl'ing (copy a file via curl or wget to one of my servers) + comparing time to serve the asset.

3) Notice asset #34

951ms for CloudFlare...

243 ms on one of my servers.

4) Notice asset #27

680ms for CloudFlare...

225ms for one of my servers...

Suggested fix.

Remove all cruft (CloudFlare + NGINX + anything else you're running).

The other challenge is you appear to be using Magento, which is extremely difficult to tune.

If you're generating substantial cash from this site, best tuning approach...

1) Relocate /tmp to tmpfs (off disk into memory). This will cause PHP session files + MySQL temporary datasets (side effect of complex SELECTs) be memory resident (run at memory speed, rather than disk head seek speed + disk i/o speed).

2) If you're running any downlevel LAMP code, upgrade to latest everything.

Currently this means Apache-2.4.25 + PHP-7.1.5 and latest OpenSSL + config Apache to run HTTP2 + ALPN + Stapling + Strict Transport.

3) If you're running MySQL (shudder), remove they MySQL software (leave data) + install latest MariaDB.

4) If you're running MyISAM tables, convert to InnoDB (after MariaDB is installed).

5) Run mysqltuner every few days + implement any diagnostics emitted.

If you're not generating substantial cash from your site yet, dump Magento + go with WordPress.

With Magento you'll always spend more for slower throughput.

I've never been able to tune a Magento site to come close to WordPress speed.

6) Finally, if you simply must use Magento (horror or horrors), then you'll have to run a memory resident database subsystem, if you have any appreciable traffic.

This means at boot time of your machine or LXD container, copy /var/lib/mysql into a tmpfs filesystem. Start MySQL/MariaDB pointing to memory resident database. Run an rsync every minute from tmpfs to /var/lib/mysql to pickup any changes. Then at host or container shutdown, as part of the systemd MySQL/MariaDB shutdown action, after daemon stops, do one final rsync to bring all data consistent.

7) Also you're running PHP 5.4.16 which is highly hackable.

Best first step, update your LAMP stack to latest.

If you're hacked, likely your site speed will become a secondary issue.

Like help speeding up your site? Skype me @ ID davidfavor for a quote. Be sure to include your site name in your Skype Add Contact request.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
Site loads but says timeout? - ShaneLabs - 05-12-2017, 07:29 AM
RE: Site loads but says timeout? - pmeenan - 05-12-2017, 11:28 PM
RE: Site loads but says timeout? - dfavor - 05-14-2017 11:14 PM
RE: Site loads but says timeout? - pmeenan - 05-16-2017, 10:49 PM

Forum Jump:

User(s) browsing this thread: 1 Guest(s)