简体   繁体   中英

Stack overflow somewhere in an IIS7 C# ASP.NET web application

My website's IIS7 worker process (w3wp.exe) is being restarted every couple of minutes due to a stack overflow exception which is happening somewhere in a medium-large application.

Event viewer doesn't provide any details as to where the error occurs in the code.

Application: w3wp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to stack overflow.

There's no stack trace in the event viewer from which to find the where the error is. There are no specific recursive functions in the code (afaik), there probably are indirect recursions, eg A calling B calling C calling A.

How do I go on about finding where the faulty code is? I can't debug with Visual Studio because it only happens on the production server with hundreds of users accessing the website.

Visual studio debugger will catch it.

Sounds like a job for windbg . Use adplus to get a crash dump:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM