We've been struggling with an issue for about a week now and wanted to hopefully reach out to the GeoNet community to see if anyone else has experienced it or has ideas on how to narrow this down further.
I've attached a very simple Python script that reproduces the issue for us, along with the traceback error, but the script is not the issue here. Everything was running successfully before, and pretty much any script we have that hits our Portal reproduces the WinErrors.
Some notes on this issue:
We tested to set up Fiddler today on our Portal machine to act as a forward proxy and hopefully log more information regarding where the failure was coming from, but this was unsuccessful. Essentially we need help narrowing this down to prove that the issue is either coming from a networking/environment standpoint or from an ArcGIS/Python standpoint.
Thank you all for your help.
I upgraded to the latest version of the ArcGIS Python API and added the following garbage collection code to my script:
#every time before I upload something
From some research I did it seems like Python wants to put the entire file into memory before uploading it, and occasionally this can cause the error...
So far so good with this kludge but we'll see.
FYI similar issue here -> Python Script Error 10054 Connection abort