Deploying an IIS Website step seems to be stuck


In our deploy process we have a step which deploys an IIS website. It’s one of the first steps we added when trying out Octopus Deploy and it has been working fine for quite some time. Lately however everytime Octopus Deploy reaches this step it performs all the right config transforms and copies all the files. At that point, according to the tasklog, it starts IISWebSite_BeforePostDeploy.ps1 and the deploy seems to get stuck. If you let the deploy go on after 30 minutes or so Jenkins will time-out and the deploy will fail. We have tried letting the step run for longer but that does not seem to provide different results. The deploy of the website previously took less than a minute.
The only major difference i could think of is that we are now building our Angular app as part of our Jenkins Pipeline but when i reverted to a previous version/branch Octopus Deploy still got stuck at the same point. I have added part of the TaskLog:
OctopusDeployTaskLog.txt (7.5 KB)

Any help would be appreciated,


Hi Menno,

Thanks for getting in touch. The code that runs after the last logged line is the PowerShell modules. Try removing all the powershell modules for that step and see if that resolves the problem.

The first step is to figure out whether the problem is with the step configuration or with the destination machine.

For this deployment do you deploy it to other machines? If so, do they work?
Do you deploy other projects to this machine? Do they work?

Could you try setting up a new project with a new IIS Website Step that just deploys an empty package to that machine and see if that works?

Another thing to try is to add another machine to the deployment and see if it does deploy to that machine?

Could you send me (via private message is required) logs of the deployment before the problem and currently?


Hi Robert,

Thanks for your reply. We have no extra powershell scripts running other than what Octopus Deploy itself uses so i am a bit at a loss which modules i would have to remove. Using your other suggestions the problem got a bit clearer. We have a few other IIS Website steps in our release process so i tried those to see if the same problems occured. Those steps also got stuck while other steps completed normally so the problem seems to be with IIS Website steps.
Next I created a new project with just an IIS Website Step and tried to deploy that to the same machine we are having problems with. This step also got stuck. After this happened i tried deploying this new project to a different machine and the step completed without problems as it created an IIS Website and started it.
So the problem seems to be with the destination machine. I have tried manually adding an IIS Website and app pool and there were no problems doing that. Next i checked if the memory usage might be too high so i turned off a bunch of processes on the machine and tried again. The step on the new project still got stuck. Any tips on how to proceed?

I have send you a private message with the logs.

Thanks again for the help,


Hi Menno,

Thanks for that. I suspect there is an issue with the IIS configuration on that machine. It looks like other scripts are starting ok, so it’s unlikely to be the bootstrapping code.

The script that is running is here, and it’s probably stuck somewhere here. Could you try running some of those commands and see if they work?

If that doesn’t give you any clues, you can attempt to debug into the script. It’s easiest to do the debugging on the same machine, but remote is possible.

If that doesn’t work, and you can figure out which PowerShell process is running the script, you can take a dump file of the process via Task Manager. I’d be happy to have a look.

Hey Robert,

Thanks for your suggestions. When i tried running the part of the powershell you highlighted as the potential problem the script got stuck at the Get-WindowsFeature part. It would say something like “collecting data 20%”. At which point it would not progress any further. So we tried restarting the machine and the problem with Get-WindowsFeature disappeared. The IIS website steps in Octopus Deploy are also now working as expected. Not sure why the restart fixed it.

Thanks for your help!


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.