Willkommen bei bytebang » The blog about all and nothing » Automatically kill hung windows applications

Automatically kill hung windows applications

Sep 24 2014

The Problem

Whenever a windows process doesnt respond to operatingsystem calls then the OS grays out the window and comes up with a message like this:


This can occur because of bad programming styles (no multithreading) but also as a consequence of bugs. However - in general this is no a big deal: Kille the process and you are done. The problem is more severe on servers that are running unattended and executing some kind of batchjobs under the currently logged in user.

On servers there may be no operator that monitors the server all the time and as a consequence of that multiple hung processes can consume a lot of memory. In the worst case this can lead to a degration in performance because the OS has to swap out the memory onto the disk or even worse a unresponsive server.

The Solution

Instead of haveing an operator who monitors the server all the time windows can do this job as well. Have a look at the following registry key:

Windows Registry Editor Version 5.00

;Kill hung programs after 5 minutes
[HKEY_CURRENT_USER\Control Panel\Desktop]

This instructs windows to look out for applications that have not responded within 5 minutes to operatingsystem requests and kills them immideatly after detectio: No hung processes-> No used memory -> No problem.

Get Social

(c) 2017, by bytebang e.U. - Impressum - Datenschutz / Nutzungsbedingungen