Bolton-and-Menk-GIS / restapi

Python API designed to work externally with ArcGIS REST Services to query and extract data, and view service properties. Uses arcpy for some functions if available, otherwise uses open source alternatives to interact with the ArcGIS REST API. Also includes a subpackage for administering ArcGIS Server Sites.
GNU General Public License v2.0
93 stars 31 forks source link

Is there a way to avoid the "Max retries exceeded" error? #34

Closed phauly closed 4 years ago

phauly commented 4 years ago

Doing some queries, I get

HTTPConnectionPool(host='sigma.madrid.es', port=80): Max retries exceeded with url: /arcgismalla/rest/services/ANIMA?f=json (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f018a23f0f0>: Failed to establish a new connection: [Errno 110] Connection timed out',))

Is there a way to be more gentle with the server and avoid this? Thanks!

philnagel commented 4 years ago

What were you trying to do when you received the error? It just means there was some sort of issue that caused your request to time out. This could be a temporary issue with the server or with your internet connection. Are you able to visit the URL http://sigma.madrid.es/arcgismalla/rest/services/ANIMA?f=json in a web browser?

phauly commented 4 years ago

Yes, it is probably some problem on the server. In fact, after 15 minutes it started to work again.

Other errors on queries on specific services I received were 1) "Invalid or missing input parameters." but this happens also on the web interface so I guess it has something to do with the server and service itself. I just skipped those services. 2) "message": "Error handling service request :0x80040067 - No Layer or Table was initialized. in '\"esriCarto.GraphicFeatureServer\"'", I guess it is some problem again with the layer and server, I just skipped those as well. 3) 502 Server Error: Proxy Error for url: Maybe this has something to do with my network provides, I don't know.

I also received some other errors such as 4) "'Munch' object has no attribute 'count'" but probably this is a bug in my code I could check but at the moment I just skipped this service as well.

What I'm trying to do is to get an idea of all the services and layers of an arcgis server in an automatic way but I don't need to get 100% of them.

I guess I can close the issue and keep investigating it. Thanks!