English 中文(简体)
Recently my site has been slow and Ive been getting timeout messages in browser - whats wrong?
原标题:

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?

问题回答

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).

Tools like YSlow will point out some opportunities for optimization but they don t acrually measure performance and they don t look at how long it takes for things to happen.

Try something like WebPagetest which will give you a browser-view of the page loading and you can work through the waterfall to see where the time is going.

If you are seeing timeouts then it s probably a back-end problem (will be pretty clear in the waterfall) and you re going to need to instrument your server to figure out where the time is going. If it s a dedicated server or VPS then you can install something like New Relic and it will point out the problem pretty quickly. If you are on shared hosting then you re going to have to add logging to your app directly (there are plugins that can do this if you are running something like Wordpress).

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 .

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





相关问题
Destroying session on close of the browser from the task bar

When I close the browser window from the task bar the session is not getting destroyed. I could handle this on closing the browser using close(X) button or by pressing Alt+F4 using javascript. But ...

InvokeMethod not working on windows form

I have a windows form containing a webbrowser that navigates to a site which sends data back in the form of a table. I would like to transfer the data on that table to a application that runs some ...

Automated web browser?

For learning purposes I would like to automate some parts in a browser game, currently I am trying to fill out some simple text boxes, without any luck though. I ve created a WebBrowser component on ...

MySQL - Username to connect using Query browser

I m fairly new to my sql, and I need to know what is the default username for mysql, like in mssql you have sa . I can connect to the mysql command client but it does not ask me for a username.

Widescreen check on normal screen

I work normal screen and I develop some web application. When the application goes on widescreen some of the pages looks weired. Is there any way I can view my web page as it looks in Widescreen on my ...

How does Google get a toolbar right below the tabs in IE?

I researched through all BHO related documentation, but I just can t figure how Google gets the translation toolbar right below the tabs in IE. Any useful pointers how to achieve the same effect for ...

How to detect page zoom level in all modern browsers?

How can I detect the page zoom level in all modern browsers? While this thread tells how to do it in IE7 and IE8, I can t find a good cross-browser solution. Firefox stores the page zoom level for ...

热门标签