Community Discussions

Ask a Question
Back to all

Failed async GET with ReadTimeout errors

Hello,

I have a pipeline running to pull device ids that is failing intermittently with a "ReadTimeout" error. Unfortunately, I'm not seeing any additional details about the failure and I'm at a loss for next troubleshooting steps. Is this something that others have encountered?

The code:
async def fetch_devices():
devices = []
last_print = time.monotonic()
seen_device_ids = set()

async for d in armis_sdk.assets.list_by_last_seen(
Device,
timedelta(days=7),
fields=FIELDS,
):
now = time.monotonic()
if now - last_print >= 60:
print(f"Ingested {len(devices)} devices so far...")
last_print = now

if d.device_id in seen_device_ids:
continue

seen_device_ids.add(d.device_id)
devices.append(d)

return devices

devices = await fetch_devices()


The Error:
ReadTimeout:
File /databricks/python/lib/python3.11/site-packages/httpx/_transports/default.py:101, in map_httpcore_exceptions()
100 try:
--> 101 yield
102 except Exception as exc:
File /databricks/python/lib/python3.11/site-packages/httpx/_transports/default.py:118, in map_httpcore_exceptions()
115 raise
117 message = str(exc)
--> 118 raise mapped_exc(message) from exc