IIS7 FastCGITimeouts

I recently had a problem with FastCGI timeouts and IIS7. After a bit of poking around I fixed the problem by running:

%windir%system32inetsrvappcmd set config -section:system.webServer/fastCgi /[fullPath=’c:{php_folder}php-cgi.exe’].ActivityTimeout:XXXX

where XXXX was the new timeout value in seconds.