I’ve an issue with powershell invoke-webrequest (it also happens using invoke-restmethod) web call. The issue is not consistent and appears randomly but quite often. Sometimes the call request is taking a really long time and when i look in the IIS -> Worker Processes for the target website the call doesn’t seem to be in process on the server. In that case it will always timeout to after set amount of time.
From the brief info you provided, it seems like a problem with the Web API hosted in IIS or the connectivity to it. Can’t see how something in Octopus would be affecting this.
Are you trying to run this Powershell script from a step in Octopus?
During the Octopus deployment, is this script being executed from the same machine hosting the Web app to which you are trying to hit, or is it being executed from a remote machine?
If you log into this remote machine and run the script manually, does it behave the same as when you run it from Octopus?
Thanks for a quick reaction. My current setup is that i have a “Run script” step that allows me to wake up the app and do so fancy stuff. The script is executed for and running from the same machine as the WebSite is.
I’ve also RDP to my VM yesterday and tried that script manually. The script worked without any problems.