Octo.exe handshake timeout

Cheers,

I am using Octo.exe through TeamCity to deploy a package, but about half of the times the handshaking step times out.
Everything is on the same machine, including the NuGet server. The machine is not CPU/RAM bottle-necked.
Octopus Server version: 1.6.1.1718

Here’s the log:
@@@
[18:02:02][Octopus Deploy] Running command: octo.exe create-release --server=“http://(server).com/” --apikey=SECRET --project=“PublicAPI” --enableservicemessages --version=“0.266-tst” --deployto=“Test” --waitfordeployment --packageversion=0.266-tst --force
[18:02:02][Octopus Deploy] Creating Octopus Deploy release
[18:02:02][Octopus Deploy] Octopus Command Line Tool, version 1.1.17.62
[18:02:02][Octopus Deploy]
[18:02:02][Octopus Deploy] Finding project: PublicAPI
[18:02:02][Octopus Deploy] Handshaking with Octopus server: http://(server).com/api
[18:03:45][Octopus Deploy] The operation has timed out
[18:03:45][Octopus Deploy] System.Net.WebException: The operation has timed out
[18:03:45][Octopus Deploy] at System.Net.HttpWebRequest.GetResponse()
[18:03:45][Octopus Deploy] at OctopusTools.Client.OctopusSession.Get[TResource](String path, QueryString queryString)
[18:03:45][Octopus Deploy] at OctopusTools.Client.OctopusSession.EstablishSession()
[18:03:45][Octopus Deploy] at System.Lazy1.CreateValue() [18:03:45][Octopus Deploy] at System.Lazy1.LazyInitValue()
[18:03:45][Octopus Deploy] at System.Lazy`1.get_Value()
[18:03:45][Octopus Deploy] at OctopusTools.Client.OctopusSession.get_RootDocument()
[18:03:45][Octopus Deploy] at ProjectExtensions.GetProject(IOctopusSession session, String projectName)
[18:03:45][Octopus Deploy] at OctopusTools.Commands.CreateReleaseCommand.Execute()
[18:03:45][Octopus Deploy] at OctopusTools.Infrastructure.CommandProcessor.Process(String[] args)
[18:03:45][Octopus Deploy] Octo.exe exit code: 2
[18:03:45][Step 3/8] Unable to create or deploy release. Please check the build log for details on the error.
@@@

Thanks!

Hi Bruno,

If no one uses the Octopus site for some time, and you browse to it in your browser, does it take a while to load? I wonder if IIS is taking a while to serve the pages because the application pool isn’t loaded.

Paul

Hello Paul,

Yes, sometimes it takes 15 seconds or more to load.
Not only when Octopus was idle, but this can happen even when it’s being used.

Any ideas as of what I could try?
This issue started after I formatted the machine and re-installed everything. Is there any settings regarding this I could have forgotten to set?
Maybe something IIS related?

Thanks,
Bruno

Hello again, can I get some further help on the matter?
Thanks!

Hi Bruno,

Checking the IIS app pool recycling settings for the Octopus site definitely sounds like a good first point. Turning off recycling, then making a few requests and testing out Octo.exe might help to rule this out.

It would be interesting to check both the Octopus logs (Windows Event Viewer is the go-to for 1.6) and IIS logs for the Octopus site (%SystemDrive%\inetpub\logs\LogFiles I think) to try to get some idea of the spread of response times, and if any errors are being reported.

Sending an export of the Octopus logs might help us formulate some hypotheses on our side.

Not sure where-to-next after this but I’ll do my best to work through it with you.

Cheers,
Nick