Solved

An unhandled win32 exception occurred in w3wp.exe  IIS Worker Process Stopped working

Posted on 2011-03-25
7
6,556 Views
Last Modified: 2012-05-11
Server 2008 Standard x64 SP2
sqlserver 2008 X64
.net framework 3.5
IIS7

server console offten show error. it's a .net website(www.51yunli.com) error.
The error happen several times a day. but sometimes it happend more than 10 times in one hour.

when error happen this website app pool will be rebooted.
mostly w3wp.exe cost about 700M memory, peak memory cost about 1.2G

An unhandled win32 exception occurred in w3wp.exe

eventlog
event 1023,.NET Runtime
NET Runtime version 2.0.50727.4206 -

sometimes it will comes with another error
IIS Worker Process Stopped working

eventlog
event 1000, Application Error

Faulting application w3wp.exe, version 7.0.6002.18005, time stamp 0x49e03238, faulting module ntdll.dll, version 6.0.6002.18327, time stamp 0x4cb74dd3,exception code 0xc0000374, fault offset 0x00000000000aca57, , process id ID 0x92c, application start time 0x01cbe96d30f53290.

Windows Error Reporting

Problem signature:
Problem Event Name:      APPCRASH
Application Name:      w3wp.exe
Application Version:      7.0.6002.18005
Application Timestamp:      49e03238
Fault Module Name:      StackHash_b36f
Fault Module Version:      6.0.6002.18327
Fault Module Timestamp:      4cb74dd3
Exception Code:      c0000374
Exception Offset:      00000000000aca57
OS Version:      6.0.6002.2.2.0.274.10
Locale ID:      2052

other .net(.net+mssql) and PHP website(PHP5.2.5+mysql) on the server works ok

already tried 4 solutions, but it doesn't work.

tried solution1
IIS Manager > DefautAppPool > Advanced Settings
and change:
Process Model > Identity
from:
NetworkService
to:
SpecificUser

tried solution2
recycle time is set to the default every 1740 minutes.
Idle timeout is set to '0'
Disable Overlapped Recycle is set to 'True'

tried solution3
config FastCgi

tried solution4
http://support.microsoft.com/kb/913384
but it would not install on windows 2008 64bit
0
Comment
Question by:yzhou_cn
  • 3
  • 2
7 Comments
 
LVL 17

Expert Comment

by:Rovastar
Comment Utility
None of your solutions you stated are tackling the problem.

You have a memory leak in your application you will need to look at the code to remove this leak.

Your 'solutions' you suggested are just messy workarounds that might make the situation a little better but will not tackle the root cause of the problem.

It is difficult to know what to recommend to help here other than debugging your code.
0
 

Author Comment

by:yzhou_cn
Comment Utility
any advice to debug the memory leak? thanks
0
 

Accepted Solution

by:
yzhou_cn earned 0 total points
Comment Utility
the issue "An unhandled win32 exception occurred in w3wp.exe" was fixed by following solution.

SqlConnection Do not use global or static. otherwise it will share the connection of different process . the solution is to to use the new connection. and close it  after use.
the issue was fixed  after  using new connection in sqlhelp.cs
0
 

Author Closing Comment

by:yzhou_cn
Comment Utility
the issue was fixed  after  using new connection in sqlhelp.cs
0
 
LVL 17

Expert Comment

by:Rovastar
Comment Utility
So I was correct I was code not an IIS issue.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now