Microsoft Knowledge Base Email Alertz

KBAlertz.com: (313888) - When you use ASP.Net to retrieve data from Microsoft SQL Server, the Web server may acquire an accumulation of aspnet_wp processes that are not using the CPU and that have only a few remaining threads. During ASP.NET process recycling, an aspnet_wp...

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com

ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




Article ID: 313888 - Last Review: March 9, 2006 - Revision: 6.3

A deadlock issue in the SQL Server network library occurs after a call to the ExitProcess function

This article was previously published under Q313888

SYMPTOMS

When you use ASP.Net to retrieve data from Microsoft SQL Server, the Web server may acquire an accumulation of aspnet_wp processes that are not using the CPU and that have only a few remaining threads.

During ASP.NET process recycling, an aspnet_wp worker process may deadlock with the Dbnetlib.dll file on shutdown after a call to the ExitProcess function. If such a deadlock occurs, the aspnet_isapi cannot kill the old aspnet_wp process, and therefore the process continues to consume memory resources. Repeated occurrences result in performance degradation.

CAUSE

If you connect to a SQL Server database from ASP.NET, it is possible for Dbnetlib.dll to cause a deadlock during process recycling. In a debugger, there will be only a few remaining threads, one of which will contain the following calls in its stack trace:
   ...
   WS2_32!WSACleanup+0x40
   dbnetlib!LibMain+0x21f
   ...
				

RESOLUTION

To work around this issue, take any action that lessens the frequency of process recycling. It may help if you disable proactive process recycling in the processModel configuration section. To do this, set the following parameters as follows:
requestLimit="Infinite"
idleTimeout="Infinite"
timeout="Infinite"
To reduce process recycling, confirm that your application is free of memory leaks, access violations, and so forth.

STATUS

If a fix for this problem is required, please contact Microsoft technical support.

MORE INFORMATION

During process termination, the LoaderLock is taken by the Ntdll.dll file so that it can begin unloading DLLs. When Dbnetlib.dll is being unloaded, it calls WS2_32!WSACleanup from its DLLMain() routine, which, in turn, attempts to unload additional DLLs. This process deadlocks, because the thread already owns the LoaderLock and can execute in only one DLLMain() routine at a time.

APPLIES TO
  • Microsoft Data Access Components 2.6
  • Microsoft Data Access Components 2.6 Service Pack 1
  • Microsoft Data Access Components 2.6 Service Pack 2
  • Microsoft ADO.NET 2.0
  • Microsoft Data Access Components 2.7
  • Microsoft ADO.NET 1.0
  • Microsoft ADO.NET 1.1
  • Microsoft ASP.NET 1.1
  • Microsoft ASP.NET 1.0
Keywords: 
kbtshoot kbprb KB313888
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Be the first to leave feedback, to help others about this knowledge base article.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please