decaporg / decaporg/decap-cms

Timeout uploading large files

Open
#4,538 12 comments 1 reaction 1 assignee Claimed by @KancerEzeroglu View on GitHub
area: extensions/backends type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Describe the bug**
When uploading a large media file to a new post, the upload repeatedly times out after 60s.
As it's a big file (~50MB), I'd expect the upload to take longer than 60s, but the CMSs repeatedly aborts and retries after 60s.
It looks like this is intentional, perhaps caused by #3649?

Console output below:
```
Pausing requests for 4 seconds due to fetch failures: Request timed out after 60 seconds
cms.js:118591 Done pausing requests
cms.js:118589 Pausing requests for 9 seconds due to fetch failures: Request timed out after 60 seconds
cms.js:118591 Done pausing requests
cms.js:118589 Pausing requests for 16 seconds due to fetch failures: Request timed out after 60 seconds
react_devtools_backend.js:2450 leave called too many times.
cms.js:118591 Done pausing requests
cms.js:118589 Pausing requests for 25 seconds due to fetch failures: Request timed out after 60 seconds
react_devtools_backend.js:2450 leave called too many times.
cms.js:118591 Done pausing requests
react_devtools_backend.js:2450 API_ERROR: Request timed out after 60 seconds
at new t (cms.js:53893:25)
at i._createSuperInternal (cms.js:796:283)
at new i (cms.js:53886:27)
at E.handleRequestError (cms.js:54745:17)
at E._callee69$ (cms.js:54804:61)
at tryCatch (cms.js:223192:40)
at Generator.invoke [as _invoke] (cms.js:223421:22)
at Generator.prototype. [as throw] (cms.js:223244:21)
at asyncGeneratorStep (cms.js:223885:24)
at _throw (cms.js:223911:9)

cms.js:223888 Uncaught (in promise) {type: "ENTRY_PERSIST_FAILURE", error: "Failed to persist entry", payload: {…}}
```

**To Reproduce**
1. Go to the CMS, add a new content entry, of a type with a "file" field.
2. Click "choose a file", then "upload" and pick a large file.
3. Save the entry, wait a few minutes.
4. See error.

**Expected behavior**
Saving should eventually succeed.

**Applicable Versions:**
- netlify-cms-app: 2.13.1
- netlify-cms-core: 2.33.1
- netlify-cms: 2.10.66
- Git provider: GitHub
- OS: Windows 10
- Browser version chrome 86

**CMS configuration**
[config.yml](https://github.com/FTWinston/bvp/blob/master/static/admin/config.yml)

**Additional context**
If [this timeout](https://github.com/netlify/netlify-cms/pull/3649/files#diff-09e74c3942d1da38115b615f80c9b97f07a86d794548fe465b94e4db4148c7c3R13) were configurable, or could be disabled when uploading files, that would seem to me to prevent this problem.

Alternatively, if this is simply a much larger file than I ought to be storing in the CMS, then by all means tell me that.

Thanks in advance!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.