clone_items throwing ConnectionResetError/Timeout error

09-20-2020 10:39 AM
New Contributor

I'm trying to copy a feature service from an AGOL organization to another AGOL account. And I'm keep receiving the following error.

ConnectionResetError                      Traceback (most recent call last)
c:\Users\PC\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\urllib\ in do_open(self, http_class, req, **http_conn_args)
   1321                 h.request(req.get_method(), req.selector,, headers,
-> 1322                           encode_chunked=req.has_header('Transfer-encoding'))
   1323             except OSError as err: # timeout error

c:\Users\PC\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\http\ in request(self, method, url, body, headers, encode_chunked)
   1253         """Send a complete request to the server."""
-> 1254         self._send_request(method, url, body, headers, encode_chunked)

c:\Users\PC\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\http\ in _send_request(self, method, url, body, headers, encode_chunked)
   1299             body = _encode(body, 'body')
-> 1300         self.endheaders(body, encode_chunked=encode_chunked)

c:\Users\PC\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\http\ in endheaders(self, message_body, encode_chunked)
   1248             raise CannotSendHeader()
-> 1249         self._send_output(message_body, encode_chunked=encode_chunked)

c:\Users\PC\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\http\ in _send_output(self, message_body, encode_chunked)
   1074                         + b'\r\n'
-> 1075                 self.send(chunk)

c:\Users\PC\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\http\ in send(self, data)
    995         try:
--> 996             self.sock.sendall(data)
    997         except TypeError:

c:\Users\PC\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\ in sendall(self, data, flags)
    974                 while count < amount:
--> 975                     v = self.send(byte_view[count:])
    976                     count += v

c:\Users\PC\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\ in send(self, data, flags)
    943                     self.__class__)
--> 944             return self._sslobj.write(data)
    945         else:

c:\Users\PC\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\ in write(self, data)
    641         """
--> 642         return self._sslobj.write(data)

ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

All the other feature services I tried work fine.

I found that one of my sublayers of the feature service was consisted by complicated polygon shape which may cause the content length too large to be cloned.

Does anyone has the same problem same with me? or does anyone know how may I set the request keep live while cloning?


1 Reply
New Contributor

I have the same problem. I am transferring a feature lay (70 megabytes) from enterprise portal to AGOL. The connection resets at exactly 3 minutes and 30 seconds every single time. It appears to be a server setting. I have not figured out how to make a keep alive that works at this time.



0 Kudos