Multiple ASP pages blocking each other - asp.net

I have some ASP pages calling SQL scripts. Each ASP page takes about 20 seconds to 'run' the complete sequence of calls to the database which involves some VBScript in the ASP pages calling multiple SQL calls.
If I put the same .asp page address in two tabs of a browser, hit refresh on both pages, the second page will wait until the first page is complete before starting. On the server itself, I can run other SQL queries without affecting the web pages or being blocked. In fact, I can see this using another CPU core.
So, I think it is an IIS issue, not SQL
Running XP Pro 64, IIS6, ASP.NET 2, MS SQL Server 2008.
Tried various setting on IIS and playing with processes / web garden.
Any help much appreciated!

Related

IIS only processing one request at a time

We have an asp.net web application that works fine in our environment. One of our partners tries to the exact same code in their environment and can only process one request at a time. For example, there is only page that calls a long running stored procedure (5 minutes). If you call that page and the try to open a new page, the new page won't serve until after the first page has completed. We can see the request back up by looking at the worker processes for their application pool. They are running IIS 8.5 on a windows 2012 server. They're also running SQL Server 2016.
The database connection is structured the same as as in our environment. The stored procedure is not wrapped in a transaction. Any ideas what might be causing this behavior?
IIS also can work in the Debug mode, when it is enabled, Asp is limited to processing one request at a time in a single-threaded manner.
Open “InetMgr” or IIS manager, double click ASP under the IIS section of the website. Check the below settings in Asp section.
See the below discussion for more information.
IIS7 - only serves up one page at a time. It's a making me crAzY!

IIS Stuck in SendResponse state

I have a classic VB6 ASP application compiled into dll's and executed through COM. The web site pulls from a SQLServer database.
One particular function builds a page by getting data rows, and then for each data row queries the database again to build rows in a sub table.
The problem is that if this page is large, and if the request for the page comes from a remote machine, then the IIS server gets stuck in the SendResponse state and never sends the page. If I call that same page using the same dataset, but call it from a browser running on the server itself, the page is quickly built and rendered. If I modify the sqlquery so that fewer rows are returned and the page is smaller, all clients can quickly load and render
I think I've confirmed that even when the page hangs the sql queries complete quickly and the COM objects have completed building the page.
I have a test server where I can test exact copies of the application but I haven't been able to find a setting in IIS or the apps web.config files that will duplicate the issue.
Is there something at the OS network layer I should be checking?

Devexpress grid slow reponse after idle

I'm using devexpress gridview on developing application that users have to view group of row data,my application works fine on development server of visual studio 2010 but when i deploy the application on iis 7.5 performance issue become clear.
when page is loaded on IE for the first time ,application respond normally and ajax calls respond fine,but when application became idle for awhile*(approximately less than 5 minutes)* ,ajax calls responding issue appear (takes 20 seconds for a single request).
note that:
-i review all application pool configurations on iis.
-i notice that when i use Firefox application respond normally but unfortunately i need to use it on IE.
-when i deploy the application locally from my machine (Local IIS) application respond normally.
could any one help please
If you're saying that the response time in Firefox is good then the issue is not IIS.
Devexpress controls are heavy on client (javascript) and can cause delays in page loading (especially if you use jQuery)
I suggest to:
create a test page that has nothing other than the gridview on it.
Enable client script debugging (in IE options)
use IE developer Profiler to see any client errors

How to identify an iisreset in an asp.net web application?

I've got an application that needs to do some work on startup (before the first request is in).
I've added the initialization code in the global.asax file (Application_start method) but this code doesn't seem to be hit after an iis reset is performed.
Is there an event which is triggered in an asp.net application when an iis reset has occurred?
Thanks.
Application start happens on first request, not on iisreset.
The site doesn't start itself..
See "Restart cache item callback on web process restart" here.
In such cases, the service will stop
running unless a page is hit and the
Application_Start is called.
Application_Start is called only when
a page is visited for the first time
in a web project.
I would suggest having a batch file that contains iisreset and an "iexplore mypage" call
Edit: apparently, you can use application end to trigger application start. YMMV
http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx
This may be of help to you.
Tho the features are new to IIS 7.5 which is only on Windows Server 2008 R2 / Windows 7.
Auto-Start Web Applications with ASP.NET 4
Some web applications need to load large amounts of data, or perform expensive initialization processing, before they are ready to process requests. Developers using ASP.NET today often do this work using the “Application_Start” event handler within the Global.asax file of an application (which fires the first time a request executes). They then either devise custom scripts to send fake requests to the application to periodically “wake it up” and execute this code before a customer hits it, or simply cause the unfortunate first customer that accesses the application to wait while this logic finishes before processing the request (which can lead to a long delay for them).
ASP.NET 4 ships with a new feature called “auto-start” that better addresses this scenario, and is available when ASP.NET 4 runs on IIS 7.5 (which ships with Windows 7 and Windows Server 2008 R2). The auto-start feature provides a controlled approach for starting up an application worker process, initializing an ASP.NET application, and then accepting HTTP requests.
Edit: Link to more information about Auto Start feature.
http://www.asp.net/LEARN/whitepapers/aspnet4#0.2__Toc253429241

Why is intranet so slow on our machines?

we are using IIS 5 + Windows XP on our machines,
they have Celeron CPUs # 2.6 ghz, 2 GB RAM
These machines have control system for machinery, control system logs events to database and we want to show reports for machinery usage, operator logins, etc.
We use Windows XP and IIS 5, our applications are ASP.NET (3.5). We use Sql server 2005 express and Crystal Reports 10.5 for reporting.
The problem is, that whenever you open an intranet page after reboot or after longer period of webserver's inactivity, it takes a LOT of time for a page to react, 10-30 seconds. When I open up a page that shows a report, it lags for this amount of time too.
When pages are viewed after the first long load, they render quickly.
The pages are precompiled (helped a bit, but not much), disk is not fragmented, sql server reacts fast (tested with other applications) - I really don't know what's the cause, but I'd like to eliminate it, because this looks very bad with the customer - to wait for half a minute for a report page to display.
Why is this so slow? I have done some sample pages on php/mysql/iis and it was lightning fast... Is there something I can do to 'preload' all of the intranet applications on machine reboot? If nothing helps, I'll make a simple script that will periodically request all pages from the webserver, so it will be 'warmed up', but this is a dumb solution, I think. :(
I guess probably the application pool for the web site is not loaded until the first request - this time is for the out-of-process host process to start running and serve up requests.
IIS takes a few seconds to compile each ASPX page after a recycle. You need to create a warmup script that programatically loads a few of your pages after the recycle. The script will incur the delay so your users don't have to.
Here is an example. http://blogs.msdn.com/joelo/archive/2006/08/13/697044.aspx It's for SharePoint, but the concept is the same and you should be able to adapt it.

Resources