You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 18, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 18, 2023. It is now read-only.
Question:
What is the best practice for statewide or nationwide api requests? When I passed in a list of statewide FSIDs for Massachusetts (> 2 million properties), I got a 429 error. When I chunk the FSIDs into groups of 50,000, I'm able to get through the large request - I noticed that based on the size of the chunk there is a relationship between the size and the speed of the access. I haven't systematically checked, but chunking by 10,000 seems to save time compared to 50,000 - about 50 more it/s.
This got me thinking that if there's an optimal request size (n) the overall time for large requests could be managed well by requesting data from the api in parallel in jobs that simultaneously request n FSIDs. Would this work? What do you recommend for managing request limits and speed?
As a follow up, after successfully reading/transforming/writing out 6 MA counties, the server got disconnected & then after trying to reconnect I get a mix of timeout errors and network errors
Ex 1
2020-09-24 10:46:08,451 asyncio ERROR Task exception was never retrieved
future: <Task finished coro=<Http.execute() done, defined at /restricted/project/places/code/user/abpoll/.conda/envs/p_test/lib/python3.6/site-packages/firststreet/http_util.py:65> exception=UnauthorizedError('Network Error 401: Inactive API Key',)>
Ex 2
2020-09-24 10:46:08,463 asyncio ERROR Task exception was never retrieved
future: <Task finished coro=<Http.execute() done, defined at /restricted/project/places/code/user/abpoll/.conda/envs/p_test/lib/python3.6/site-packages/firststreet/http_util.py:65> exception=RateLimitError('Network Error 429: Rate limit exceeded. Limit: 5. Remaining: 0. Reset: 55',)>
Traceback (most recent call last):
Activity
jrp1113 commentedon Sep 24, 2020
@seripap what are your thoughts here?
abpoll commentedon Sep 24, 2020
As a follow up, after successfully reading/transforming/writing out 6 MA counties, the server got disconnected & then after trying to reconnect I get a mix of timeout errors and network errors
Ex 1
2020-09-24 10:46:08,451 asyncio ERROR Task exception was never retrieved
future: <Task finished coro=<Http.execute() done, defined at /restricted/project/places/code/user/abpoll/.conda/envs/p_test/lib/python3.6/site-packages/firststreet/http_util.py:65> exception=UnauthorizedError('Network Error 401: Inactive API Key',)>
Ex 2
2020-09-24 10:46:08,463 asyncio ERROR Task exception was never retrieved
future: <Task finished coro=<Http.execute() done, defined at /restricted/project/places/code/user/abpoll/.conda/envs/p_test/lib/python3.6/site-packages/firststreet/http_util.py:65> exception=RateLimitError('Network Error 429: Rate limit exceeded. Limit: 5. Remaining: 0. Reset: 55',)>
Traceback (most recent call last):
Lyetenth commentedon Sep 24, 2020
Hey @abpoll, I think the issue's been resolved. Please reopen if you don't hear back