Resolution
Disable delta compression for the project. Add a project variable named Octopus.Acquire.DeltaCompressionEnabled with the value False. Then create a new release, or update the variable snapshot of the existing release, and redeploy to the targets that hung.
Treat this as a diagnostic step first. If the deployment now gets through Acquire Packages, delta compression was the cause, and you can decide whether to leave it off as a workaround.
Symptom
A deployment sits in the Acquire packages step and never succeeds or fails. You have to cancel it. The task log typically stops at the delta stage on one or more targets:
Uploading and applying delta
No further log lines appear for that target, and other targets in the same deployment may finish normally. When you retry, a different set of targets may hang.
Delta compression can also fail outright in Acquire Packages. A missing or mismatched .octodelta file produces an error like this:
Step Failed: "Octopus.AcquirePackages" - With Failure: "Activity failed with error 'Could not find a part of the path
'C:\Octopus\Work\<id>\<package>_<hash>_to_<version>_<hash>.octodelta'.
System.IO.DirectoryNotFoundException: Could not find a part of the path '...octodelta'.
Delta progress that shows 0% or 20% for a while does not mean the deployment is stuck. Octodiff has a known progress-reporting quirk, and the full delta is still being applied. Treat it as a hang only if the step makes no progress at all.
Scope: when this is the right article
This article applies when all of the following are true:
- Octopus Server pushes the package to a Tentacle, either from the built-in package repository or from the server's package cache after downloading it from an external feed.
- The hang or failure happens in Acquire packages, during the delta signature, delta calculation, or "Uploading and applying delta" stage.
- The target already has an earlier version of the same package in its package cache, so Octopus can build a delta.
It's especially likely when:
- The hang is intermittent and moves between targets on retry.
- CPU on the Octopus Server or the target is very high during package acquisition.
- Task logs show that deltas regularly come to 50% or more of the full package size.
This article does not apply if the package is downloaded directly on the target, because delta compression isn't used in that case.
Cause
Delta compression sends only the difference between a package the target already has and the new version, instead of the whole package. It uses Octodiff:
- Calamari on the target finds the nearest earlier version of the package in its cache and creates a signature file for it.
- Octopus Server calculates a delta between that version and the new package.
- Octopus Server uploads the delta (
.octodeltafile) to the Tentacle. - Calamari applies the delta to rebuild the new package, then checks the result against the expected hash.
Octopus automatically uploads the full package instead when the delta is within 80% of the new package's size, or when any of these steps fails cleanly. That fallback doesn't help when a step stalls without failing. Delta compression can cause a stall or failure in Acquire Packages because:
- Calculating and applying the delta is CPU intensive. Large packages, many targets deploying at once, or small target machines can push CPU to its limit. The step then stops reporting progress.
-
The cached package on the target is corrupt or doesn't match. The delta is built against the wrong base and can't be applied, which produces the
.octodeltapath errors. - Packages change too much between versions. The delta saves little bandwidth but still costs the full calculation, often because builds embed changing timestamps or other artificial differences.
Diagnosis and fix
- Open the raw task log for the deployment that hung. Find the Acquire packages step for an affected target and confirm that the last lines mention the delta signature, delta calculation, or "Uploading and applying delta". If the log stops somewhere else, delta compression is unlikely to be the cause.
- In the project, go to Variables > Project and add a variable:
-
Name:
Octopus.Acquire.DeltaCompressionEnabled -
Value:
False - Scope: Leave it unscoped to disable delta compression for every deployment of the project. To limit the test, scope it to the affected environment or targets.
- Save the variables. The current release still uses its old variable snapshot. Create a new release, or open the existing release and select Update variables to refresh its snapshot.
- Deploy the new or updated release to the same environment and targets that hung.
Temporary diagnosis or permanent workaround
Start by treating the change as temporary, so you know whether delta compression caused the problem.
It's reasonable to leave delta compression off permanently when:
- Bandwidth between Octopus Server and the targets isn't a constraint, for example when they're on the same network segment.
- CPU on the Octopus Server is pegged during deployments.
- Task logs show deltas regularly coming to 50% or more of the full package size, so delta compression saves little.
If none of these apply and bandwidth matters to you, fix the underlying cause, such as high CPU or a bad cached package. Then turn delta compression back on: delete the variable, or set it to True, and create a new release.
Verify
Redeploy to the same targets that hung before, and check the following:
- The Acquire packages step for each target shows a full package upload, with no delta signature, delta calculation, or "Uploading and applying delta" lines.
- Acquire packages finishes on every target, and the deployment moves on to the next step.
- The result holds over several deployments. A hang that moved between targets can take a few runs to confirm.
- How long Acquire packages takes, compared with the task log of a deployment that worked before the problem started.
If every run succeeds with delta compression disabled, delta compression was the cause. After the change, expect:
- Larger transfers. Every deployment sends the full package to each target, so network use goes up.
- Slower package acquisition on slow or remote links. Large packages going to many targets over limited bandwidth take longer to transfer.
- Lower CPU use during acquisition. Octopus Server and the targets no longer calculate or apply deltas.
If disabling delta compression does not resolve the issue
If Acquire packages still hangs or fails with Octopus.Acquire.DeltaCompressionEnabled set to False in the deployed release's variable snapshot, delta compression isn't the cause. Leave the variable in place while you investigate, so delta compression stays out of the picture, and continue with these steps:
-
Clear the package cache on the affected target. A damaged or unexpected package in the Tentacle's package cache, usually
C:\Octopus\[instance]\Fileson Windows, can break package acquisition. Remove the cached versions of the affected package, or apply a package retention policy, and redeploy. - Check resources on Octopus Server and the target during acquisition. Watch CPU, memory, and free disk space while the deployment runs. A single overloaded machine can hold up the whole step.
- Check Tentacle communication. Run a health check on the affected targets and confirm that each one is healthy and that the Tentacle version is current.
- Check your Octopus version. If Octopus Server or Tentacle is out of support, upgrade it. Package acquisition has had fixes in newer versions.
- Collect diagnostics and contact Octopus Support. Send the raw task log from a failed deployment and from a successful one, a system diagnostic report, and, if the deployment is hanging, a process dump of Octopus Server and of the Tentacle and Calamari processes on an affected target, taken while the deployment is stuck.
Related
- Delta compression for package transfers covers how delta compression works and how to turn it off.
- Get the raw output from a task shows how to download the full task log for a deployment.
- Capturing a process dump explains how to take a process dump of a hung Octopus Server or Tentacle process.
- Tentacle package cache retention policies covers how Tentacle keeps and cleans up cached packages.