Frequent error 420 "Timeout waiting for parallel processing" when uploading a video to Cloudinary
I am having an non-periodic but very frequent issue when I'm trying to upload a video file to Cloudinary.
My app is a Rails app integrating Cloudinary with Carrierwave. I'm using the Cloudinary File Upload jQuery plugin to perform direct uploads in chunks from the browser, before saving the video to the database with Carrierwave. The problem is, I'm being frequently returned an 420 error, the message being: "Timeout waiting for parallel processing"
I am having this issue with all sizes of video files. Sometimes it works, sometimes it doesn't.
I can't find documentation about this issue. What could be the cause of such a problem?
Thanks,
Emmanuel
-
Hi Emmanuel,
Can you please open a support ticket here-https://support.cloudinary.com/hc/en-us/requests/new and share the original video and the code you are using to upload and we can take a deeper look.
Thanks,
Aditi0 -
I've had this issue with the npm library. The fix for me was to switch from `upload` to
`upload_large(localPath, {timeout: 120000, eager_async: true})`
I also had to solve the problem that awaiting upload_large doesn't resolve to the final result of the file upload, but instead to a `Chunkable`, which is a cloudinary stream thing which I don't know how to use.
In order to get the response of the file upload like I had been getting from awaiting `upload`, I had to use the callback argument of `upload_large`, which gets called with the result after the whole file is uploaded/errored. I did this to promisify this callback:
```
const cloudinaryUploadLarge = promisify((cb) => cloudinary.v2.uploader.upload_large(
localFilePath,
uploadOptions,
cb
)).bind(
cloudinary
);```
My use-case is for a one-off migration where run-time wasn't very important, so I could then just await these uploads.
0 -
Hi Luke,
Thanks for sharing your implementation and I am glad you are able to resolve your issue.
Alternatively, it is also possible to use the "async=true" parameter to perform the upload request in the background (asynchronously) together with the use of a webhook (i.e., using the notification_url parameter) in order to receive the upload response (a webhook) when the upload or any requested asynchronous action is completed.
0
Post is closed for comments.
Comments
3 comments