Modelon Solutions

A fresh take on your ideas

Coincidences coincidences, debugging w3wp.exe

Published by

on

Yesterday we found a memory leak in one of the web sites we are working on. The process on the test server was up to 10 gigs of memory. Our first though was to open the task manager, click “create dump file”, zip the file, copy it to a machine with Visual Studio on it and then see what kind of objects were in there.

Turns out that when opening the dump file, Visual Studio would give us an error saying the file was invalid or corrupt, which was kind of weird.

This morning, I found this article on MSDN which describes the problem I ran into :http://blogs.msdn.com/b/amb/archive/2015/03/26/iis-application-pool-may-be-terminated-during-dump.aspx

Basically, when you create a dump file, the process gets suspended. By default, ASP.NET pings the process every 30 seconds and kills it if it doesn’t respond within 90 seconds. Since the dump file took more than 90 seconds, that was our problem.

The solution for us was not to alter the ping settings, but create the dump file when the process got to 2 gigs of memory, from then on it was easy to look at what was in there and then fix the bug.

Leave a comment

Previous Post
Next Post