# Shotgun API connection speed is too slow in China

**URL:** <https://community.shotgridsoftware.com/t/shotgun-api-connection-speed-is-too-slow-in-china/7266>\
**Category:** Flow Production Tracking\
**Created:** [February 13, 2020, 11:17am UTC](https://community.shotgridsoftware.com/t/shotgun-api-connection-speed-is-too-slow-in-china/7266 "2020-02-13T11:17:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonghankim](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/jonghankim/32/894_2.png) [@jonghankim](https://community.shotgridsoftware.com/u/jonghankim)\
**Post date:** [February 13, 2020, 11:17am UTC](https://community.shotgridsoftware.com/t/shotgun-api-connection-speed-is-too-slow-in-china/7266/1 "2020-02-13T11:17:55Z")

</div>

Hi,  
All goes well with you.  
I am working in China.  
I made API application coded by python, which uploads clips to shotgun Version entity.  
Not only the connection speed on Web interface somewhat slow but also API connection speed is too slow.  
Can you let me know how we speed up the connection?

Thanks.

Jonghan

---

<div class="post-metadata">

**Author:** ![jonghankim](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/jonghankim/32/894_2.png) [@jonghankim](https://community.shotgridsoftware.com/u/jonghankim)\
**Post date:** [February 13, 2020, 1:49pm UTC](https://community.shotgridsoftware.com/t/shotgun-api-connection-speed-is-too-slow-in-china/7266/2 "2020-02-13T13:49:15Z")

</div>

# Hi, I have found that there was some error while trying to connect storage url. Is this related to upgrading to “Direct upload to S3” my Python\_api is 3.2.2, Python 2.7 error messages are below :

Traceback (most recent call last):  
File “clip\_upload.py”, line 104, in i\_shotgun\_upload  
result = sg.upload(“Version”, w\_version\_id, w\_movie\_clip\_file,field\_name=“sg\_uploaded\_movie”)  
File “C:\Python27\lib\site-packages\shotgun\_api3\shotgun.py”, line 2432, in upload  
tag\_list, is\_thumbnail)  
File “C:\Python27\lib\site-packages\shotgun\_api3\shotgun.py”, line 2468, in \_upload\_to\_storage  
self.\_upload\_file\_to\_storage(path, upload\_info[“upload\_url”])  
File “C:\Python27\lib\site-packages\shotgun\_api3\shotgun.py”, line 3887, in \_upload\_file\_to\_storage  
self.\_upload\_data\_to\_storage(fd, content\_type, file\_size, storage\_url)  
File “C:\Python27\lib\site-packages\shotgun\_api3\shotgun.py”, line 3979, in \_upload\_data\_to\_storage  
result = opener.open(request)  
File “C:\Python27\lib\urllib2.py”, line 429, in open  
response = self.\_open(req, data)  
File “C:\Python27\lib\urllib2.py”, line 447, in \_open  
‘\_open’, req)  
File “C:\Python27\lib\urllib2.py”, line 407, in \_call\_chain  
result = func(\*args)  
File “C:\Python27\lib\urllib2.py”, line 1241, in https\_open  
context=self.\_context)  
File “C:\Python27\lib\urllib2.py”, line 1198, in do\_open  
raise URLError(err)  
urllib2.URLError: \<urlopen error [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond\>

---

<div class="post-metadata">

**Author:** ![jonghankim](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/jonghankim/32/894_2.png) [@jonghankim](https://community.shotgridsoftware.com/u/jonghankim)\
**Post date:** [February 13, 2020, 3:19pm UTC](https://community.shotgridsoftware.com/t/shotgun-api-connection-speed-is-too-slow-in-china/7266/3 "2020-02-13T15:19:09Z")

</div>

the problem was solved after I change my DNS server address.  
Is this the only solution?

Jonghan

---

<div class="post-metadata">

**Author:** ![bouchep](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/bouchep/32/93_2.png) [@bouchep](https://community.shotgridsoftware.com/u/bouchep)\
**Post date:** [February 18, 2020, 9:10pm UTC](https://community.shotgridsoftware.com/t/shotgun-api-connection-speed-is-too-slow-in-china/7266/6 "2020-02-18T21:10:53Z")

</div>

Hi @jonghankim,

If your DNS wasn’t returning the proper ip for the requested domain, I would expect you might stumble on the issue outlined in your second message.

When you say a DNS change solved your problem, was this the speed problem from the first message, the connection problem from the second message or both problems?

---

<div class="post-metadata">

**Author:** ![jonghankim](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/jonghankim/32/894_2.png) [@jonghankim](https://community.shotgridsoftware.com/u/jonghankim)\
**Post date:** [February 19, 2020, 1:21am UTC](https://community.shotgridsoftware.com/t/shotgun-api-connection-speed-is-too-slow-in-china/7266/7 "2020-02-19T01:21:19Z")

</div>

Hi Bouchep, thank you for your response.

Caused by the bad virus epidemic, crews are working at home for a while.  
Every crews have different network service companies at their home.  
Some of them are quite slower than previous, some of them are not able to connect.  
In office, it is doable but slower.

Thanks.

---

<div class="post-metadata">

**Author:** ![jonghankim](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/jonghankim/32/894_2.png) [@jonghankim](https://community.shotgridsoftware.com/u/jonghankim)\
**Post date:** [April 10, 2020, 3:26am UTC](https://community.shotgridsoftware.com/t/shotgun-api-connection-speed-is-too-slow-in-china/7266/8 "2020-04-10T03:26:28Z")

</div>

I still have the speed problem.  
Super slow to upload files through API.  
And web interface is slow too.  
How can I enhance this?

Jonghan
