ReadTimeout when trying to upload images to cloudinary
Hi
i have a small script the uploads images to Cloudinary (from one project to another) and seems like sometimes (and recently too many times) we get a random timeout when trying to upload images.
this is the code we are using:
def upload_images(res):
for image in res['resources']:
out=cloudinary.uploader.upload(file=image['url'],tags=image['tags'],public_id=image['public_id'],invalidate='true',overwrite='true',format=image['format'],config=configure(int_conf))
# Fetch all images from prod and upload to int
res = cloudinary.api.resources_by_tag(tag='xxx',max_results = 500,resource_type='image',tags='true', config=configure(prod_conf))
upload_images(res)
while 'next_cursor' in res:
res = cloudinary.api.resources_by_tag(tag='xxx',max_results = 500,resource_type='image', tags='true',config=configure(prod_conf),next_cursor=res['next_cursor'])
upload_images(res)
sometimes i see the following errors on the log on the upload command:
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.cloudinary.com', port=443): Read timed out. (read timeout=<object object at 0x7fdad6d26060>)
cloudinary.api.Error: Unexpected error - ReadTimeoutError("HTTPSConnectionPool(host='api.cloudinary.com', port=443): Read timed out. (read timeout=<object object at 0x7fdad6d26060>)")
any idea what is the reason for this error and what can be done to prevent this?
thanks
Chen
-
Hi Chen,
In order to be able to investigate it, we'll need to look at your logs. Would you mind sharing your cloud name and the relevant timeframes? if you rather keep it private, please feel free to open a support ticket at support@cloudinary.com and we'll continue from there.
Thanks!
0 -
thanks for your response roee.
i've opened a support ticket...
0
Post is closed for comments.
Comments
2 comments