cloudinary / cloudinary_npm

Cloudinary NPM for node.js integration
629 stars 323 forks source link

Error: { message: 'Request Timeout', http_code: 499, name: 'TimeoutError' } #547

Closed mugishap closed 2 years ago

mugishap commented 2 years ago

So, the problem is that I encountered a problem while uploading videos. As you know videos are somehow large so I would like to ask if there was a way that a person change when the timeout error can pop up because videos (eg: a song) can be up to 200 mb and 200mb can't be uploaded just in one minute. Maybe if there is a way you can help I'm looking forward to your help. Thanks. image

aleksandar-cloudinary commented 2 years ago

Hi @mugishap - Could you please share the code you are using to upload? Large files (100MB and over) need to be sent in chunks/parts and for that, we have the upload_large method. Are you currently using this? https://cloudinary.com/documentation/node_image_and_video_upload#node_js_video_upload If not, please use this method and you can optionally pass a chunk_size parameter to that method set to a lower value (20MB default) - that way, each chunk will be smaller in size and will take a lower amount of time to upload and should be within the default 60s timeout. You could set the chunk_size as follows chunk_size: 6000000 to set it to 6MB. If you're running into a timeout even with lower chunk_size then you could increase the timeout by passing that parameter in the configuration (same level as cloud_name, api_key etc). Let us know how it goes.

mugishap commented 2 years ago

That documentation does it thank you very much

mugishap commented 2 years ago

Thank you very much for your reply. I just got the answer in the documentation you gave me.

On Sat, 9 Apr 2022 at 20:32, Aleksandar Kostadinov @.***> wrote:

Hi @mugishap https://github.com/mugishap - Could you please share the code you are using to upload? Large files (100MB and over) need to be sent in chunks/parts and for that, we have the upload_large method. Are you currently using this? https://cloudinary.com/documentation/node_image_and_video_upload#node_js_video_upload If not, please use this method and you can optionally pass a chunk_size parameter to that method set to a lower value (20MB default) - that way, each chunk will be smaller in size and will take a lower amount of time to upload and should be within the default 60s timeout. You could set the chunk_size as follows chunk_size: 6000000 to set it to 6MB. If you're running into a timeout even with lower chunk_size then you could increase the timeout by passing that parameter in the configuration (same level as cloud_name, api_key etc). Let us know how it goes.

— Reply to this email directly, view it on GitHub https://github.com/cloudinary/cloudinary_npm/issues/547#issuecomment-1094102906, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWOVNYHN3ZM6SFEMRCWTNYTVEHEKRANCNFSM5S7UJRXA . You are receiving this because you were mentioned.Message ID: @.***>