views:

49

answers:

3

How can I diagnose timeout problems and slow page loading with my site, I have ySlow plugin in firefox and it shows that grade A/B for most pages so i would expect pages to load quickly. Should I contact my hosting company? The company I bought my domain name from? There is not much load on the server at present and I am using a v. fast connection to connect to the internet.

wheres a good place to start? How can i monitor this when we start seeing more traffic? Should hosting company be doing this?

A: 

The first step is to establish whether the problem is client-side or server-side.

A good YSlow grade indicates the problem probably isn't clientside. YSlow checks to see that you don't have too many objects on the page, that you have minified your javascript/CSS etc. It does not evaluate the performance of your network or server.

Using YSlow/Firebug, check to see how long it takes to load the actual HTML of your page. If that is taking a long time, then the problem is almost certainly with your server, network or server-side code.

To rule out network issues, compare accessing your site from the server itself to accessing it over the internet. If it's a lot slower over the internet the problem could be network-related.

If it's not client-side or network-related, then it's either that your server is struggling for resources or that your code is slow (perhaps because the amount of data it is mananaging has grown).In that case, check the server logs and run a profiler on your code (on a development server but with a copy of production data).

ctford
A: 

The first place to look would be the server logs , that should provide you a clue as to what is happening and how much time a request is taking in general .
If the server is returning fine and the page is taking long because of client side code , you might want to use the Firebug profile to profile your page and find out more . Hope this helps .

NM
A: 

Want kind of pages are you trying to load? Plain html or scripts like PHP? If plain html I guess its your hosting company.

Martin Hoegh
Im loading PHP pages, would it make a difference that Im hosting in UK but purchased domain name from goDaddy? I have set it to point to my server in UK ... is this adding extra roundtrip for pages?
undefined
No , that should not make any difference . The DNS info would propagate and there would not be ably extra roundtrip for the pages .
NM
Thank you ankur
undefined
It could be your PHP page that goes into infinite loop or some thing. Or a database query that takes very long? You could try to time your script by setting $timeStart=microtime(); at the beginning of the script and $timeEnd=microtime(); at the end and echo the different out on the page.
Martin Hoegh