Skip to content

Umbraco Partial/Tree/Workspace restore not working on sites with high volume of media #335

@lakesol

Description

@lakesol

Using restore from source to target system where the the volume of media is great, the restore fails.

Reproduction

Bug summary

I am trying to do a restore of content from one environment to another. When I do a partial restore within media for a whole folder it fails with an error: e.g.

[09:14:24 ERR] Work dd240cf2-16c6-4bd6-a4af-5283cfc07851 has failed.
Umbraco.Deploy.Core.Exceptions.ProcessArtifactException: Process pass #0 failed for artifact umb://media-file/b0jecd2y/<my media file>.jpg.
---> Umbraco.Deploy.Infrastructure.Exceptions.RemoteApiException: The remote API has thrown an exception.
at Umbraco.Deploy.Infrastructure.Http.DeployHttpClient.SucceedOrThrow(HttpResponseMessage result, CancellationToken token)
at Umbraco.Deploy.Infrastructure.Http.DeployHttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken token)
at Umbraco.Deploy.Infrastructure.Environments.RemoteUmbracoEnvironment.GetFileStreamsAsync(Guid sessionId, IEnumerable`1 udis, IFileTypeCollection fileTypes, CancellationToken token)
at Umbraco.Deploy.Infrastructure.Environments.RemoteFileSource.GetFilesAsync(IEnumerable`1 udis, IFileTypeCollection fileTypes, Boolean continueOnFileNotFound, CancellationToken token)
at Umbraco.Deploy.Infrastructure.Connectors.ServiceConnectors.FileConnectorBase.ProcessOptimized(ArtifactDeployState`2 state, IDeployContext context, Int32 pass)
at Umbraco.Deploy.Infrastructure.Connectors.ServiceConnectors.FileConnectorBase.Process(ArtifactDeployState`2 state, IDeployContext context, Int32 pass)
at Umbraco.Deploy.Infrastructure.Connectors.ServiceConnectors.ServiceConnectorBase`3.Process(ArtifactDeployState dart, IDeployContext context, Int32 pass)
at Umbraco.Deploy.Infrastructure.Environments.CurrentEnvironment.ProcessArtifacts(IEnumerable`1 arts, String ownerEmail, IDeployContext context, CancellationToken token)
--- End of inner exception stack trace ---
at Umbraco.Deploy.Infrastructure.Environments.CurrentEnvironment.ProcessArtifacts(IEnumerable`1 arts, String ownerEmail, IDeployContext context, CancellationToken token)
at Umbraco.Deploy.Infrastructure.Environments.CurrentEnvironment.ProcessPackageAsync(Guid sessionId, Package package, CancellationToken token)
at Umbraco.Deploy.Infrastructure.Work.WorkItems.DeployRestoreWorkItemBase.ProcessPackage(Package package, Nullable`1 batchIndex, Nullable`1 numberOfBatches)
at Umbraco.Deploy.Infrastructure.Work.WorkItems.TargetPartialRestoreWorkItem.Proceed()
at Umbraco.Deploy.Infrastructure.Work.WorkItems.TargetPartialRestoreWorkItem.ExecuteAsyncSub(IWorkContext context, List`1 resume, CancellationToken token)
at Umbraco.Deploy.Infrastructure.Work.WorkItems.TargetPartialRestoreWorkItem.ExecuteAsyncSub(IWorkContext context, List`1 resume, CancellationToken token)
at Umbraco.Deploy.Infrastructure.Work.WorkItems.TargetPartialRestoreWorkItem.ExecuteAsync(IWorkContext context, CancellationToken token)

This folder does contain a very large amount of child items and the media files total up to be quite large ~1.7GB

But if I then restore that single media item listed, it works fine e.g.

[09:16:59 INF] Create manifest on source
[09:17:00 INF] Review manifest on target
[09:17:00 INF] Create package on source
[09:17:00 INF] Complete remote session
[09:17:00 INF] Process package on target
[09:17:01 INF] read umb://media-file/b0jecd2y/<my media file>.jpg
[09:17:01 INF] Complete remote session
[09:17:01 INF] Suspend document cache.
[09:17:01 INF] Suspend indexers.
[09:17:01 INF] Commit
[09:17:01 INF] Restore caches and indexes
[09:17:01 INF] Resume scheduled publishing.
[09:17:01 INF] Resume document cache (reload:False).
[09:17:01 INF] Resume indexers (rebuild:True).
[09:17:01 INF] Complete
[09:17:01 INF] Deployment fc375410-7457-4d61-aed2-125124b73677 completed.

My Assumption is either the total item count or the payload size is blowing out system limits, causing the issues seen.

This appears then to be a batching/approach issue. If your batching system is capable of restoring single files but not multiple.. This is an approach issue. There should be configuration which allows the system to restore smaller chunks of data from source to target to avoid system limitations.

When looking at the documentation this appears to be a known issue. However the suggestion to just restore smaller blocks of data is not helpful/user friendly when trying to work on large systems.

Specifics

In this example this is a restore from Cloud to local windows development. But have seen the same issue between cloud<->cloud.

Steps to reproduce

See above

Expected result

To cope with large/complex/media heavy sites the approach for data transfer should be reviewed to allow working within system/technical limits. Forcing uses to just restore smaller chunks of data manually is not efficient.

Actual result

See exception above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions