Long Delay on First Request to ASP.NET 2.0 Application

I have worked several issues recently regarding long delays on the first request to an ASP.NET application. These delays are much longer than typical app domain startups and JIT compiles. To troubleshoot these issues, I get hang dumps of the process to see what's going on. In those dumps, I can see that we are calling the LsaLookupNames2 API and we're waiting on that call. In almost all of the cases, we're waiting on an account lookup for an account named ProcessIdentity.

The source of this is a call we make in webengine.dll during the startup of the application domain. Because the ProcessIdentity account doesn't exist, we sit and wait on name resolution from trusted domains, etc. A workaround is to add a local account called ProcessIdentity to the web server, but many customers don't like that workaround.

We currently have a hotfix in the works for this issue. Once that hotfix is available, I will post information on it. In the meantime, you can use the workaround mentioned above. Please don't contact me or PSS asking for the fix for this. We haven't finished the fix yet and you won't be able to get it, but I thought it was an important enough issue to let you know about it now.

If you have a question, please post a comment here instead of calling PSS.

Thanks!

Jim

Published 25 October 07 11:00 by jamesche
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# MSDN Blog Postings » Long Delay on First Request to ASP.NET 2.0 Application said on October 25, 2007 2:06 PM:

PingBack from http://msdnrss.thecoderblogs.com/2007/10/25/long-delay-on-first-request-to-aspnet-20-application/

# Dustin said on December 3, 2007 5:27 PM:

Greetings Jim,

Just curious if you have any timelines for the release of the hotfix?  Thanks, for letting us know about the issue saved me alot of wasted time.

# jamesche said on December 4, 2007 3:53 AM:

Dustin,

We've just moved past the customer testing stage and we're building the installation package now. I'd hope to have it within the next couple of weeks.

Jim

# Dustin said on December 4, 2007 1:19 PM:

Thanks Jim,

Look forward to the release.

Regards,

Dustin

# Cheshire's Blog said on January 8, 2008 10:14 AM:

A while back, I wrote a post regarding slow startup of ASP.NET 2.0 applications due to a lookup on a

# Noticias externas said on January 8, 2008 10:26 AM:

A while back, I wrote a post regarding slow startup of ASP.NET 2.0 applications due to a lookup on a

# If broken it is, fix it you should said on January 17, 2008 8:14 AM:

After making some changes to their domains one of my customers noticed that their ASP.NET 2.0 applications

# Noticias externas said on January 17, 2008 8:58 AM:

After making some changes to their domains one of my customers noticed that their ASP.NET 2.0 applications

# Paul Lynch said on January 21, 2008 9:16 AM:

Hi Jim,

Does this issue only affect .Net 2.0 ?

The reason I ask is that we are experiencing a very similar issue which affects all of our .Net apps (1.1 and 2.0)

The original issue we had is actually mentioned by Tess here (http://blogs.msdn.com/tess/archive/2008/01/17/asp-net-hang-slowness-on-startup.aspx)

Unfortunately, upgrading to the 64-bit version didn't fix the issue in the long run - it re-emerged after a while and we still haven't fixed it. So, I'm wondering if the issue we've got may actually be due to this bug in the .Net Framework ?

Regards,

Paul Lynch [MVP - IIS]

# jamesche said on January 21, 2008 9:50 AM:

Hi, Paul. There is a similar issue that I've seen a couple of times in 1.x. The only way to know for sure what's happening in your case is to debug it and see why the slowness is happening.

If you open a case with us, we can get a dump of the process and debug it to see what's going on.

Jim

# Ricky said on February 16, 2008 3:54 AM:

Hi Jim,

Thank you for the blog, its very informative.  I have a question with out applictaion and hoping you can shed some light on this.

we recently deployed a asp.net app in our UAT server, and are experiencing a long delay response with, usually the response time is 100ms or around there.  but if there are no requests for a minute or so then the next request takes about 7seconds, event through the page size is only 7kb.  Its like the app "goes to bed" or unloads, I am not using session state and I have turned it off in my webconfig, we are using windows2003 and iis 6. is there some setting that I am missing, if you could shed any light on this that would be great.  Thanks for the blog.

Cheers,

Ricky

# jamesche said on February 18, 2008 7:54 AM:

Ricky,

It's really hard to say without collecting data and troubleshooting. It could be that your idle timeout on the Performance tab of app pool properties has been set far too low. It could also be that something has caused the application domain to unload.

You can monitor the PID and Application Restarts using perfmon. That might give you a better idea of what's going on.

Jim

# alembic said on February 19, 2008 9:50 AM:

Hi Jim,

I'm currently encountering this issue on my development workstation. I've applied .NET 2.0 SP1 but this has not helped. I called tech support and was told that that KB 944157 has been archived and is no longer available at the support site. I was also told that the hotfix has been pulled. Is there an updated KB article? Thanks. Jo

# jamesche said on February 19, 2008 12:35 PM:

Hi, Jo. If you're still seeing a delay after installing SP1, it's not the same issue. I am perplexed by the message you received from our support. Can you email me at jamesche@microsoft.com and let me know the details of that call?

Jim

# coolcat said on August 21, 2008 2:24 PM:

Hi Jim,

We have a WinForms based .Net 2.0 application

Its taking more than a minute to start up intially

Is there any tool to troubleshoot this kind of startup issues

Will the performance profiler help here as its for after the loading

Thanks,

# jamesche said on August 22, 2008 6:24 AM:

I'm not sure what profiler you're talking about, but if you want to know what's going on in the process during that time, a post-mortem debug analysis is a good way. There could, however, be issues with a winforms app that I wouldn't know of since I am exclusively a web app guy.

Jim

# Mark said on November 10, 2008 4:35 AM:

I too have a .Net 2 application (built in IronSpeed) that now has a 50 sec delay on starting up. Any help on tracking down the problem would be appreciated.

Thanks

# jamesche said on November 10, 2008 11:33 AM:

Hi, Mark. You'd want to be sure that 50 seconds is abnormal. In other words, it could just be JITting your app that causes that delay. However, if you want to find out for sure, the best way is to get a hang dump of the process during the delay and examine the threads to see what's going on in the process.

If you don't know how to do that, you can open a case with us and we can assist.

Jim

# Peter A said on March 31, 2009 2:46 PM:

I am using Citrix Web Interface 5, an ASP.NET 2.0 application, on Windows Server 2003 / IIS 6.

It takes 2 minutes to access the first time (and after some idle time even though I configured the App pool to never shut down).

I have applied .NET FrameWork 3.5 SP1 and the family updates; I have added a local account called ProcessIdentity; none of these steps has resolved the issue.

What can I try next; how do I get a hang dump of the process during the delay?

Thanks,

Peter A.

# jamesche said on March 31, 2009 2:55 PM:

Peter,

You should open a case with us and have one of our engineers assist you with that.

Jim

# Peter A said on April 1, 2009 10:09 AM:

Jim,

How do I open a case with you?

PS: It takes a while to open this blog page almost every time I try and from different computers at different locations. Just FYI.

Peter A.

# jamesche said on April 1, 2009 10:25 AM:

Hi, Peter. The MSDN blog site is slow right now for some reason. Not sure why.

You can find a contact method using our support site at support.microsoft.com.

Jim

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required

Search

This Blog

Syndication

Page view tracker