Getting both FastCGI module and AppPool CPULimit to work

FastCGI module available in IIS 7.0 did not work when CPULimit for the application pool was enabled. This was because when CPULimit feature was enabled WAS uses job objects to track CPU usage of worker processes. WAS keeps a job object for each application pool and all worker processes which belong to that application pool are made part of that job object. FastCGI module uses job objects to make sure that there are no orphan child processes left when worker process goes away. Note that FastCGI requires a per process job object while WAS requires a per application pool job object. For this reason, it was not possible to make WAS take care of killing FastCGI child processes when worker process dies. Because a process can only be part of one job object on windows and also the fact that a child process becomes part of the job object if parent process is already part of existing job object, FastCGI module was unable to make child processes part of another job object when CPULimit was turned on and used to fail with error “Unable to place a FastCGI process in a JobObject. Try disabling the Application Pool CPU Limit feature”.

Customers who used CPULimit feature complained about limitation. We recommended customers to use WSRM (windows system resource manager) but some wanted to continue using CPULimit functionality. Due to requests from these customers we have fixed this issue in Windows 7 (Win2K8 R2) and also released a QFE for Win2K8 release. In the fix, WAS lets FastCGI make its child processes part of other job object. Also FastCGI module keeps track of CPU usage of its child processes and periodically report CPU usage by children back to WAS which then adds that to the application pool CPU usage count.

You can read more about this here and here. QFE can be downloaded from here.

Hope this helps.