Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long timeout when IGDB is unavailable #90

Open
eniklas opened this issue Nov 10, 2021 · 0 comments
Open

Long timeout when IGDB is unavailable #90

eniklas opened this issue Nov 10, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@eniklas
Copy link
Owner

eniklas commented Nov 10, 2021

We uploaded a new DB and IGDB happened to be unavailable when we ran gamatrix:

Nov 07 21:17:48 batty 75e0f465caf1[1777]: 2021-11-07 21:17:48 INFO helpers.igdb_helper xboxone_1794566092: getting ID from IGDB
Nov 07 21:18:00 batty 75e0f465caf1[1777]: 2021-11-07 21:18:00 ERROR helpers.igdb_helper Request to IGDB failed: HTTPSConnectionPool(host='api.igdb.com', port=443): Max retries exceeded with url: /v4/external_games (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fd0b61d9bb0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
Nov 07 21:18:00 batty 75e0f465caf1[1777]: 2021-11-07 21:18:00 INFO helpers.igdb_helper 1 API failures, sleeping 2
Nov 07 21:18:08 batty 75e0f465caf1[1777]: 2021-11-07 21:18:08 ERROR helpers.igdb_helper Request to IGDB failed: HTTPSConnectionPool(host='api.igdb.com', port=443): Max retries exceeded with url: /v4/external_games (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fd0b5cddd90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
Nov 07 21:18:08 batty 75e0f465caf1[1777]: 2021-11-07 21:18:08 INFO helpers.igdb_helper 2 API failures, sleeping 4
Nov 07 21:18:22 batty 75e0f465caf1[1777]: 2021-11-07 21:18:22 ERROR helpers.igdb_helper Request to IGDB failed: HTTPSConnectionPool(host='api.igdb.com', port=443): Max retries exceeded with url: /v4/games (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fd0b473ab80>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
...
Nov 07 21:20:08 batty 75e0f465caf1[1777]: 2021-11-07 21:20:08 INFO helpers.igdb_helper 10 API failures, sleeping 20
...
Nov 07 21:36:30 batty 75e0f465caf1[1777]: 2021-11-07 21:36:30 ERROR werkzeug Error on request:
Nov 07 21:36:30 batty 75e0f465caf1[1777]: Traceback (most recent call last):
Nov 07 21:36:30 batty 75e0f465caf1[1777]:   File "/usr/local/lib/python3.9/site-packages/werkzeug/serving.py", line 319, in run_wsgi
Nov 07 21:36:30 batty 75e0f465caf1[1777]:     execute(self.server.app)
Nov 07 21:36:30 batty 75e0f465caf1[1777]:   File "/usr/local/lib/python3.9/site-packages/werkzeug/serving.py", line 311, in execute
Nov 07 21:36:30 batty 75e0f465caf1[1777]:     write(data)
Nov 07 21:36:30 batty 75e0f465caf1[1777]:   File "/usr/local/lib/python3.9/site-packages/werkzeug/serving.py", line 290, in write
Nov 07 21:36:30 batty 75e0f465caf1[1777]:     self.wfile.write(data)
Nov 07 21:36:30 batty 75e0f465caf1[1777]:   File "/usr/local/lib/python3.9/socketserver.py", line 799, in write
Nov 07 21:36:30 batty 75e0f465caf1[1777]:     self._sock.sendall(b)
Nov 07 21:36:30 batty 75e0f465caf1[1777]: TimeoutError: [Errno 110] Connection timed out

From the user perspective it just hangs for 20 minutes; it will try every request, taking longer each time due to the backoff, until the connection times out. Update it to give up after, say, 3 failures. When this happens, add a warning to the results page that it happened.

@eniklas eniklas added the enhancement New feature or request label Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant