Current time: 12-18-2017, 03:07 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
10 second TTFB on individual files
10-06-2014, 01:12 PM
Post: #1
10 second TTFB on individual files
Please take a look at my test result: http://www.webpagetest.org/result/141004_Z4_FVN/

As you can see, there are four WordPress theme files that are taking over 10 seconds to load, which is making every page on the site take more than 12 seconds until "start render".

I have tried disabling W3 total cache and have also updated my theme to the latest version.

I am using Amazon Cloudfront as a CDN (which should have automatically been disabled when I disabled W3).

This only started happening a couple of days ago.

Any ideas what this could be and how to fix it? Thanks.
Find all posts by this user
Quote this message in a reply
10-07-2014, 05:49 AM
Post: #2
RE: 10 second TTFB on individual files
Make sure you run more than 1 test just to make sure you don't have an outlier (from the sound if it you might already have done that).

Those 5 files all appear to be served from the main www domain so they are not being served through cloudfront and are all calling into php.

It looks like your main site is also behind CloudFlare (which shouldn't be a problem but you don't really need 2 different CDN's). You might want to reach out to CloudFlare and see why those requests are not being cached. It could be that they disable caching for resources with a .php extension or with query params even though the response headers say it is cacheable and they have css/js mime types.

Ultimately, if you can figure out why those 5 requests are SOOOO expensive on your server, everything will be a lot faster anyway. The main HTML seems to respond fast enough so it has to be something in the app code specific to those requests.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-07-2014, 07:27 AM (This post was last modified: 10-07-2014 07:28 AM by dme102.)
Post: #3
RE: 10 second TTFB on individual files
Thanks for the reply Patrick.

I disabled Cloudflare as well as W3 Total cache (running several tests after each and checking the file origins).

The problem remains, even without any caching running!

Latest test result: http://www.webpagetest.org/result/141006...1/details/

I guess it must be a theme issue.

Is it worth approaching the theme author or getting a developer to take a look? Thanks.
Find all posts by this user
Quote this message in a reply
10-07-2014, 07:52 AM
Post: #4
RE: 10 second TTFB on individual files
The main problem is certainly with the theme but the responses are marked as cacheable so CloudFlare should be able to hide the problem pretty effectively if you can figure out why they aren't caching those resources. If it's just a quick settings change in the control panel you might be able to get most of the win with minimal effort.

To fix the root cause is going to require getting a developer involved (either the theme author or an outside developer).
Visit this user's website Find all posts by this user
Quote this message in a reply
10-07-2014, 09:03 AM
Post: #5
RE: 10 second TTFB on individual files
Got it fixed. The theme author had acknowledged the problem and released a fix, but just updating the theme wasn't enough. One has to go to the theme settings in WordPress and save the options so that static files are generated (?).

There is still a 3 second TTFB on the server (http://www.webpagetest.org/result/141006_WZ_18MC/) but that's a lot better than the previous 12 seconds. Now to fix that issue!

Thanks for your help Patrick -- much appreciated.
Find all posts by this user
Quote this message in a reply
11-19-2014, 06:32 AM
Post: #6
RE: 10 second TTFB on individual files
"It looks like your main site is also behind CloudFlare (which shouldn't be a problem but you don't really need 2 different CDN's). You might want to reach out to CloudFlare and see why those requests are not being cached. It could be that they disable caching for resources with a .php extension or with query params even though the response headers say it is cacheable and they have css/js mime types."

Just thought I would clarify in the event anyone else stumbled across this...

CloudFlare caches by file extensions & not mime types. The default CDN would not cache .php or .html by default, but you could look at using PageRules to extend it beyond the static content we would cache automatically.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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