umbraco / Umbraco.Deploy.Issues

1 stars 0 forks source link

Timeout when importing ZIP #203

Open bjarnef opened 7 months ago

bjarnef commented 7 months ago

I am trying to export items as ZIP and import on development environment as regular transfer timeout: https://github.com/umbraco/Umbraco.Deploy.Issues/issues/128#issuecomment-1904094812

"Deploy": {
  "Settings": {
    "ContinueOnMediaFilePathTooLongException": true,
    "MediaFileChecksumCalculationMethod": "Metadata",
    "NumberOfSignaturesToUseAllRelationCache": 0,
    "IgnoreBrokenDependencies": true,
    "IgnoreBrokenDependenciesBehavior": "All",
    "PreferLocalDbConnectionString": true,
    "DatabaseCommandTimeout": "0.1:30:00",
    "HttpClientTimeout": "0.1:30:00",
    "SessionTimeout": "0.1:30:00",
    "SourceDeployTimeout": "0.1:30:00",
    "DiskOperationsTimeout": "0.0:20:00"
  }
}

https://docs.umbraco.com/umbraco-deploy/deployment-workflow/import-export

If I export frontpage (or a child node) with only "Include content dependencies (e.g. related media and content)" checked it download the ZIP. However it seems odd the folder contains 2314 items.

654 document and 1660 media items. Although the content has dependencies to media items, it seems pretty much like entire media archieve - and I know a lot of the media items for this specific project isn't used in content - only references by UCommerce media picker on products.

When importing this on development it timeout.

If I export frontpage only without any checkboxes selected the ZIP only contain and single item, but even then the ZIP import on development timeout.

image

image

If also seems the import is missing some kind of feedback while in progress.

image

Umbraco 13.0.3 Forms 13.0.1 Deploy 13.0.3

bjarnef commented 7 months ago

After setting the following in Deploy settings it seemed to continue. Odd that a single document item would cause a timeout 🤔

"PackageBatchSize": 100,
"SourceDeployBatchSize": 100

image

image

bjarnef commented 7 months ago

It seems it also within a few minutes processed 2314 items and imported content/media now with batch size. Maybe there should be a batch size set by default, since it seems to work much better and we often face the timeout error otherwise.

AndyButland commented 7 months ago

Glad it worked for you in the end, but I'm a bit confused by the reports to be honest. I'll ping @ronaldbarendse for his thoughts, but to my knowledge the batch size settings aren't used for import (only for backoffice transfers).

bjarnef commented 7 months ago

I think eventually PackageBatchSize affected this - at least it made a big difference after adding these settings. FYI the Umbraco Cloud project on on Standard plan - not sure if there are different timeouts depending on plan size.

ronaldbarendse commented 7 months ago

I think eventually PackageBatchSize affected this - at least it made a big difference after adding these settings.

As @AndyButland already mentioned, this setting only applies to backoffice transfers/restores, not the import/export operations. Applying the setting caused the environment to restart, which seems to have fixed the timeout issue.

Looking at the /umbraco/backoffice/deploy/ui/Import endpoint that timed out, this should be a quick operation that starts the operation in a background task runner and returns the ID (which then shows/updates the progress via SignalR). This however uses locks to prevent starting multiple tasks at the same time, so my guess is that something caused a deadlock. Can you check the logs and see whether the Beginning deployment {id} informational message is logged or not before you got the timeout?

bjarnef commented 7 months ago

@ronaldbarendse that's odd. I tried a lot of different settings of Deploy before the batch size and also manual restarted the development several times, but I only got the timeout error event just frontpage document in ZIP.