Site had very slow loading time (16-20 Secoonds)

Hello,

My website is loading very slow and i cant seen to figure out what the problem is. From the test results it shows that the content download seems to be the problem (blue bar).

This is the homepage which links to several other subdomains. They two are taking a long to time to load fully aswell.

Test Results

http://www.webpagetest.org/result/111112_5A_25HJA/1/details/

Any help would be greatly appreciated.

Donal

Technically it is the blue bar but it isn’t actually downloading content that whole time (the bandwidth utilization is 0). What is happening is that your site is sending out the bulk of it’s content quickly and the browser loads what it can but something near the very end is doing a VERY expensive operation on the server which is causing the very last part of the HTML to take 15 seconds before it is generated.

I’d start by looking at anything that comes before wedding-new.jpg in the site code (though it might also come after that and the buffers just don’t get flushed out). Odds are that it is going to be a back-end call out to some other service or to a database. It could even be something that isn’t user visible (like some back-end process that tracks stats).

If you can track it down and fix/remove the expensive operation it will also SIGNIFICANTLY improve your server capacity because that long operation is also tying up one of your server connections for the 15+seconds.

Thanks for the advice, i have been looking through all my files to try find the very expensive operation but am having no look.

I have went through the backend files, could it also be included in a function or class files…?

Is there any way (program or trick) to find out which file or part of code is causing the problem.

At least i know what im looking for now.

many thanks

Donal

Yes, it could be included in a function, class or module.

If you have access to the server to install php modules, New Relic has a 14 day free trial of their software which should be able to tell you exactly where the time is going ( http://newrelic.com/ ).

Hi!

I used WPTs TCPDump feature, and there it is visible, that you receive two chunks, totalling in 2444 Bytes, rather immediately. And then, after some 15 seconds, you get the final 430 Bytes. Unfortunately the answer is gzipped, so you can’t see, what is in the last 430 Bytes (@Pat: How about a feature, that let’s you disable Accept-Encoding GZIP Headers? :slight_smile: )
Looking at the decompressed response, the bottom area of the Page’s source right before the wedding image, and after the last quickly loaded image, looks like this:

[quote]

Company |
<a href="http://hfs-online.com/products_new.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">New products</a> | 

<a href="http://hfs-online.com/wedding_lists.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Wedding/Engagement Lists</a>  |  

<a href="http://hfs-online.com/contact_us.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Contact Us</a>  | 

<a href="http://hfs-online.com/store_location.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Store Location</a> |  

<a href="http://hfs-online.com/account.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">My Account</a>   |  

<a href="http://hfs-online.com/checkout_shipping.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Checkout</a> | 

<a href="http://hfs-online.com/reviews.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Reviews</a>  | 

<a href="http://hfs-online.com/security.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Security</a> | 

<a href="http://hfs-online.com/terms_conditions.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Terms & Conditions</a> |  

<a href="http://hfs-online.com/returns.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Returns</a> | 

<a href="http://hfs-online.com/sitemap.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Site Map</a>
</div>

<div class="footerdetails">	

Home Field and Stream, Online Sales, 18-20 Church St, Enniskillen, Co. Fermanagh, BT74 7EJ

</div>    		

<div class="footercopyright">
Copyright &copy; 2011 <a href="http://hfs-online.com/index.php?osCsid=34c23e38072628cdd7e62bd2dd75b933">Home, Field & Stream</a>	</div>
[/quote]

Maybe that helps?

Kind regards,
Markus

FWIW, I haven’t tried it but you might be able to use the setHeader script command to override the Accept-Encoding header: https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/scripting#TOC-setHeader

Found out what the problem was, the .htcaccess file was referencing a file thumbs.bd which slowed the whole site down…

I didnt get round to using the newrelic software, but thanks for pointing me in the right direction… Chuffed to have finally sorted the problem.

Site now loading in 1.9 seconds. big differences.

thanks again

Donal

Nice. Out of curiosity, how was .htaccess referencing the file? It just seems really strange for it to hit right in the middle of the response (though it could have been hitting at the end and the buffer just hadn’t flushed yet).

Glad to see it cleaned up nicely though.

the line was ‘php_value auto_append_file’ then the thumbs.db location.

I removed it and it worked… any idea what it was doing

Looks like it is supposed to automatically add the contents of that file to every response. Never seen that one before.

Also looks like it may be the leave-behind signature of a site hack: http://www.neubreed.com.au/blog/2011/06/how_clean_after_thumbsdb_wordpress_and_php_auto_append_file_exploit_hack

Awesome! Works! :slight_smile:

please help my site too,realy slow
i’m worried about google update for mobille friendly site
SPG EVENT
:frowning: