slow of first page, running on windows/IIS - asp.net

I'm more into the LAMP stack, but I've been asked to work on a site that is running Windows and IIS 2008. I'm a beginner with IIS, so please be patient with me on this, and please ask me to provide more information if that is needed to determine.
I read the answer here (Slow first page load on asp.net site), but it seems like if I go to the site with one browser it takes long to load the first page, then fast on all other pages, then if I open up another browser, it's the same thing, so it's not something that is saved on the server, but per session?
Is there a way to have the application running at all times?
Right now it is taking 12 to 15 seconds for the first page to load.
I have access to the WebControlCenter and FTP.

I would look in the Global.asax page and see if there is anything going on when a session is started. There usually is a method in there called Session_Start that is called whenever a session is started. Also, it might have to do with the site being configured in debug mode. You can change the web.config setting to false, which has a big impact on performance.

I'm familiar with the phenomenon described in the question you've linked to, but your what you're describing does seem a bit odd.
firstly- try Jeff's suggestion and see if indeed there's something at the beginning of the session which slows it down.
If not- try answering this-
1. is the first page always slow or only on first access to it?
2. what happens if you open another tab in the browser (not a different browser)?
3. it's possibel that the page contains some heavy resources (like images, script files etc.) which are only downloaded on the first access to the page. try tracing your http responses you get and see what their sizes are.
4. try to enable trace on your web page to see the events which are taking the longest time (on aspx you need to add 'Page Trace="true"' to the page declaration)
hope one of these helps...

Have you tried a http debugger here? Lots of things could be going on here, but the fact that you get different behavior by using different browsers indicates it is probably some particular resource that is overweight.

Related

Huge loading time on some pages

Here is my page URL: www.1800-gifts.com/USA/Cake-Delivery and other pages like that all are loading very slow even i have caching , compression enabled, i have tried to call go daddy which is my hosting provider but they do not respond positive.
Developer is telling me that it is a server issue, but i don't find any issues in server it is fine.
This website is developed in asp.net 4.0, database is mssql 2012 r2.
server is VPS, with 2 gb of ram, I have 2 GB data in database, and some table contains more than 100k records.
Please look at my site and give me suggestions, i have checked in google page speed and other tools they are all saying different views.
I am not sure if this is the cause but if you enable developer mode (F12) and run the site in chrome you will see that the cake-delivery page is the one that is causing the loading time (44s). You will also notice that there are JQuery errors on the page.
This could possibly be part of the problem.
EDIT:
After looking at the linked page I think Erik is right, JQuery is not the issue.
The person that is developing the site needs to revisit the way the page works completely. There is a massive amount of operations happening in the page load of the page. The operations that are used are also hack and slash ways of doing things that there is already built in methods for. This is simply a page taking forever to load due to bad coding.
I would suggest the developer returns to the drawing board.
There are a lot of great tools that look at your page and tell you what might be wrong with it. Analyzing your page with GTmetrix for example gives you this. There are also important tips you can work on right away, for example:
gzip compression
Minifying css, html and js
Concatenating scripts
and a lot more. I also recently wrote an article showing important optimization for web performance
Looking at the waterfall chart of your page (also available on GTmetrix) shows that the biggest problem is indeed your server. It takes 16 seconds to receive an answer for the first request (time-to-first-byte). There is clearly something wrong!
There are a lot of things that could be wrong on your server. You should test your database queries (are they slow? How many are performed for a page load?).

Glimpse lost account of time? Slow web form requests

I just installed glimpse to try and track down some slow loading on pages that basically don't do much. This issue happens on local(not as bad though) but worse on pre production server.
I see the start request, then nothing.. then all the SQL and page cycles (yes, still damn web forms) all go quickly ~800ms. For an empty site that is is pretty shite but the problem is it takes 2,3 sometimes 6 seconds and I cannot work out why.
Anybody know how to work out the missing piece?
On the lifecycle it looks like its already delayed 1916.02ms What comes before the lifecycle of webforms?
Here are a few things you can look into:
Is this only happening on the first hit to the page? (IE: Is this JIT overhead?)
Do you have any HTTP Modules doing work during BeginRequest?
What about Global.asax and BeginRequest?
You can add System.Diagnostics.Trace.Write() statements in your BeginRequest and look at the Trace tab and Timeline tabs to get more information about the time in the red box.

What exact settings required in iis for asp.net pages to process it faster?

I am having a simple blank page without any source code.The page also taking very long time to come.I am not able to understand the reason behind this.
The domain is getting a high requests.
What exact settings needs to be done in iis 7.0 so that it will be faster.
Please help.
ASP.NET pages always have an initial delay when the first request is made after the file has been created/edited/uploaded because the server needs to recompile them, however it shouldn't be more than 2-3 seconds in practice, and does not affect subsequent pageloads.
The only thing I can think of is an overloaded server. Assuming you're on a shared hosting package then I recommend you find another ISP. If not, then I'm afraid there's a lot more to it than just a "page pages load faster" switch hidden away.

Quickiest way to determine why a site is sluggish?

I just picked up a client who's Wordpress web site takes anywhere between 8 to 22 seconds to START loading. The loading delay also occurs when using the Wordpress backend so I'd like to fix the loading issue first before starting my work (template re-design). What's the quickest yet efficient way to determine why this Wordpress site is taking so long to start loading?
Thanks in advance
P.S. - They currently have a caching plugin installed (WP Super Cache) which I assume the previous web developer installed to help with the loading issue but it only helps with the front-end and not the back-end.
Try to run some test like YSlow and Google Page Speed and read their results and suggestions.
Google Speed Online is helping me a lot with analysis of my websites.
http://pagespeed.googlelabs.com/
I use browsermob. They use real browsers to test the site load performance. Shows very nice graphs showing how long each and every request took. Also shows how many requests happen in parallel. As they use real browser, you can see how long it will take to load on a real browser. Then you can choose from which location you want to test. You can choose a UK location to test how fast your page loads from UK.
By the way, I am in no way related to browsermob. I just happen to be a satisfied user of this.
And it is free.
Your server is probably loading far too many modules and is thrashing the disks as it's run out of memory.
You need to both reduce how much memory each PHP instance consumes and limit how many PHP instances can run simultanouesly to ensure you don't use virtual memory for your PHP instances.
I've written a detailed answer to a very similar problem here on Stack Overflow:
How can I figure out why my Wordpress pages load so slowly?
Well, i have came across a similar situation, such things happen when your website is hosted on a GridHosting server, which means it changes according to the server load, but sometimes the things are just opposite the scenario, the best way to check why it is slow is to first ping the website at random interval , so in this way you will know if the distance is the cause or the packet dropping is the issue, secondly, you need to make sure your server's configurations is good, i.e; request your host about a RAW log of your website, in this way you can know what is it taking long for your server to response, and the least best method is to check and make sure that your DNS resolves in a good time, and try to use some free CDN services like CloudFlare.
Hope this helps.

Plone yields 404 on new content save

The issue: a content editor saves a new content item and gets a 404 on the proper-looking url for the new object. If they then refresh, the item is there, perfectly normal.
This happens for multiple Archetypes-based content types, and we've seen it on at least two different sites. We've seen it on Plone 3.x and 4.0.3. Here's what these sites have in common:
HAProxy load balancing (with and without session affinity)
Multiple ZEO clients
Using either ZODB 3.9.7 or 3.8.4
The issue happens only some of the time, maybe for 1 out of 4 content items
Has anyone seen anything like this?
I do not have an answer for you; this should not really happen. I certainly have not seen this.
You'll need to gather more information to troubleshoot this, and that perhaps requires interactive access to experts, and SO is not the place for such troubleshooting.
All I can do is advice that you gather as much information as possible, including a full trail of the user interaction from the various logs, including HAProxy and the ZEO server.
It may require additional instrumentation at the server level (when the NotFound error occurs, dump additional information about what is present, etc).
Some recomendations/questions:
Verfy that the content object was, indeed, created.
Check that the content views are correct (the ones that are declared in profiles/default/types/yourtype.xml).
Does it happen when adding content directly to plone instance (Without caching and load balancing?
Does it happen when adding content to direct plone instance with load balancing, but without caching? ---> And so on ...?
Maybe not an elegant one, but you might try inserting print statements or pdb breakpoints in the code so you can track whenever a content object was, indeed, created. Do this only as a desperate method of "instrumentation".
Yes. we have recently started seeing the same issue. We have almost the same setup. Haproxy (no session affinity).
I'm wondering since the pattern seems to be haproxy... perhaps its an issue with a request being redistributed after a timeout?
Updated:
We had this issue. It happens when you have a redirect back to the changed object after a save. This is because the 2nd request hits another zeo client which doesn't realise it's out of date.
The only solution we found was a to add temporary session affinity in haproxy (20s) during any POST. Not ideal but does work. I was just searching for a better solution which is why I found this old post.

Resources