0

My website hosted in IIS became inaccessible. In the event log on the server, I saw this error:

Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 01/01/2018 00:00:00 AM 
Event time (UTC): 01/02/2018 6:00:00 AM 
Event ID: 64b4d6533abd4e71b3ba30b9008d7d86 
Event sequence: 1921230 
Event occurrence: 1 
Event detail code: 0 

Application information: 
    Application domain: /LM/W3SVC/2/ROOT-1-131865989552967444 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: C:\inetpub\wwwroot\MyWebsite\ 
    Machine name: MyWebServer

Process information: 
    Process ID: 3388 
    Process name: w3wp.exe 
    Account name: NT AUTHORITY\SYSTEM 

Exception information: 
    Exception type: HttpException 
    Exception message: The remote host closed the connection. The error code is 0x80070057.
   at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
   at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
   at System.Web.WebSocketPipeline.DoFlush()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.WebSocketPipeline.<ProcessRequestImplAsync>d__9.MoveNext()



Request information: 
    Request URL:  
    Request path:  
    User host address:  
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: NT AUTHORITY\SYSTEM 

Thread information: 
    Thread ID: 112 
    Thread account name: NT AUTHORITY\SYSTEM 
    Is impersonating: False 
    Stack trace:    at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
   at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
   at System.Web.WebSocketPipeline.DoFlush()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.WebSocketPipeline.<ProcessRequestImplAsync>d__9.MoveNext()


Custom event details: 

Restarting only the website caused the error to be logged again, but with a different code (0x800704CD instead of 0x80070057). The website was still inaccessible. Restarting the app pool resolved the issue.

What is this error, and how can I stop it from happening again?

Googling both error codes yields results from people who were encountering the error intermittently (post1, post2). The difference is that their websites don't appear to be brought down by this error, and they are seeing the error intermittently. I saw it twice, and had to manually intervene just to get the website running again.

Rainbolt
  • 3,332
  • 16
  • 41
  • There are some tools to monitor the IIS. Process Monitor tool is very helpful. It collects the IIS logs and narrow down which specific dll is causing the issue. We need to know, which specific class (or) project is throwing this exception error. – goofyui Nov 14 '18 at 20:47
  • @goofyui There's a stack trace in the error. Does that help? – Rainbolt Nov 14 '18 at 20:52
  • Whatever you shared is from Event Viewer Log (or) from IIS Log stored in the IIS log folder path ? Please also download the Process Monitor Tool provided by Microsoft. Our objective is to find which class (or) project layer is throwing this exception – goofyui Nov 14 '18 at 20:56
  • The call stack shows "WebSocket". Do you use your own WebSocket code or SignalR? – Lex Li Nov 14 '18 at 20:57
  • Yeah, i do see that error : System.Web.WebSocketPipeline.DoFlush() - Some where garbage collector leak is happening .. – goofyui Nov 14 '18 at 21:02
  • @goofyui It's from Windows Event Log, and the source is ASP.NET 4.0.30319.0. – Rainbolt Nov 14 '18 at 21:03
  • @LexLi We do use SignalR in the website. We tried restarting the website, and that didn't help. Do you think something from SignalR was staying alive in the app pool and causing the app to crash again? – Rainbolt Nov 14 '18 at 21:04
  • Is any of your class method or object is interacting with WebSocket layer ? – goofyui Nov 14 '18 at 21:05
  • 1
    The issue has been well discussed https://github.com/SignalR/SignalR/issues/1790 and workaround (handling the exceptions) is mentioned. The posts you linked above are completely irrelevant, and no doubt they don't help. Use Google smartly and serve it with SignalR keyword, and that's the right way to find the relevant information. – Lex Li Nov 14 '18 at 22:32
  • @LexLi Thanks for the link. I did find and read a few of the SignalR issues on this topic before I posted, including the one you linked to. Davidfowl (the creator) wrote that the exception can be ignored and should not cause a process crash. Additionally, the stack traces in those issues mention SignalR, but my stack trace does not. So, I didn't pay much attention to the solutions presented there. I'll try handling the error as suggested. I'll probably never be able to confirm or deny the solution, because this has happened one time in the years that this website has been running with SignalR. – Rainbolt Nov 15 '18 at 00:40

0 Answers0