Esri / Esri/arcgis-python-api

WARNING:urllib3.connectionpool:Connection pool is full, discarding connection

Open
#2,195 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
2.2k
Forks
1.2k
Avg merge
2h 40m
Merged PRs (30d)
2

Description

**Describe the bug**
Cloning Web Maps with many layers in ArcGIS Online notebook causes urllib connection pool errors. possibly due to many hosted feature views published from single hosted feature layers, or many hosted feature layers in the web maps, not sure.

**To Reproduce**
Steps to reproduce the behavior:
```python

print('importing modules')
from arcgis.gis import GIS
import urllib3
from getpass import getpass

urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

# Variables
source = GIS("home")
print(source)

target = GIS(url = r'https://tgt.maps.arcgis.com',username = 'tgt_usr',password = getpass())
print(target)

print('Ready to clone')

source_group = source.groups.get(source_group_id)
items_to_clone = source_group.content()

print(f'Source Group: {source_group.title}')
print(f'Source User: {source.users.me.username}')
print(f'Target User: {target.users.me.username}')

for item in items_to_clone:
if item.type == 'Web Scene' or item.type == 'Web Experience' or item.type == 'Dashboard':
print(f'Cloning {item.id}: {item.type}: {item.title}')
try:
new_items = target.content.clone_items(items=[item], copy_data=True)
except Exception as e:
print(e)
for new_item in new_items:
print(f'{new_item.id}: {new_item.type}: {new_item.title}')
else:
pass
```
error:
```python
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: services6.arcgis.com. Connection pool size: 10
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: services6.arcgis.com. Connection pool size: 10
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: services6.arcgis.com. Connection pool size: 10
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: services6.arcgis.com. Connection pool size: 10
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: services6.arcgis.com. Connection pool size: 10
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: services6.arcgis.com. Connection pool size: 10
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: services6.arcgis.com. Connection pool size: 10
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: services6.arcgis.com. Connection pool size: 10
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: services6.arcgis.com. Connection pool size: 10
```

**Expected behavior**
All layers to clone without error messages

**Platform (please complete the following information):**
- OS: Windows
- Browser: Chrome
- Python API Version 2.4 (ArcGIS online)

**Additional context**
Add any other context about the problem here, attachments etc.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.