tl-its-umich-edu / tool-migration

App for migrating external (LTI) tools in Instructure's Canvas LMS.
1 stars 3 forks source link

resolve `PoolTimeout` errors (iss. #27) #28

Closed lsloan closed 1 year ago

lsloan commented 1 year ago

According to HTTPX's documentation, in the Fine tuning the configuration section, a timeout can be set for waiting for a connection from the connection pool. When that timeout is exceeded, a PoolTimeout exception is raised. The HTTPX client configuration we had been using didn't specify a pool timeout, so the value was effectively 0.0s. Experimentally, I found that setting any value greater than zero helped our application get connections from the pool without error. HTTPX's documentation said the timeout may also be set to None, meaning it will never timeout, it will wait "forever". There seems to be minimal risk to that, so I've set that as the timeout value. We may want to look into making this configurable if we continue to use this API class.