Using Web Jobs to Capture Hang Dumps

In the recent update of Windows Azure Web Site, we added a new great feature – Web Jobs. This allows you to run custom jobs (executables or scripts) in one of three ways: on demand, continuously, or on a schedule.

Here are two great documents about awesome feature.

Months ago, I posted a blog about how to using Kudu Console to capture hang dumps to troubleshooting performance issues. The task is much easier using the Web Jobs. In this article, I will discuss about how to capture hang dumps using the Web Jobs.

1. Download and install Debugging Tools for Windows

The tool can be download here.

2. Create the Web Job Batch

Create a file named run.cmd with follow contents.

adplus.exe -quiet -HANG -o d:\home\site\wwwroot -pn w3wp.exe

3. Upload the tool

After installed Debugging Tools for Windows on your local machine, please go to the folder where the tool was installed. Zip follow files into a package like







Note: By default, Windows Azure Web Sites runs a 32bit W3WP.EXE on 64bit system. Using a 32bit adplus.exe is recommended. If you are running site with 64bit process (Available for standard mode, can be enabled on the portal.), you must upload 64bit version of binaries listed above.

4. Create a “Run on demand” web job using the zip created in last step.

For details steps, please reference the document.



5. Capture dumps

Now, when you are experience any performance slowdown of your web site, you get the dump generated simply by just click “RUN ONCE”.


6. The dump is generated under the wwwroot folder, you can download using FTP.


See you next time,

Wei from GBSD DSI Team

Comments (0)

Skip to main content