the-blue-alliance / the-blue-alliance

A webapp for accessing information about the FIRST Robotics Competition.
https://www.thebluealliance.com
MIT License
392 stars 175 forks source link

2021 District Details throwing 500s #3516

Open ZachOrr opened 3 years ago

ZachOrr commented 3 years ago

The 2021 District Details (events/{district_code}/2021) pages are throwing 500s. I'm unable to reproduce this issue locally - probably because I'm missing some data.

Ex: https://www.thebluealliance.com/events/pch/2021

Screen Shot 2021-04-20 at 1 12 22 AM Screen Shot 2021-04-20 at 1 13 25 AM
phil-lopreiato commented 3 years ago

I think this is also caused by https://github.com/the-blue-alliance/the-blue-alliance/issues/3515

Trace hitting locally on the prod db:

Traceback (most recent call last):
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/tba/src/backend/common/decorators.py", line 19, in decorated_function
    resp = make_response(cached(func)(*args, **kwargs))
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/flask_caching/__init__.py", line 475, in decorated_function
    rv = f(*args, **kwargs)
  File "/tba/src/backend/web/handlers/district.py", line 87, in district_detail
    for team in teams_future.get_result():
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/google/cloud/ndb/tasklets.py", line 191, in result
    self.check_success()
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/google/cloud/ndb/tasklets.py", line 138, in check_success
    raise self._exception
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/google/cloud/ndb/tasklets.py", line 311, in _advance_tasklet
    yielded = self.generator.throw(type(error), error, traceback)
  File "/tba/src/backend/common/queries/database_query.py", line 54, in fetch_async
    query_result = yield self._do_query(**self._query_args)
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/google/cloud/ndb/tasklets.py", line 311, in _advance_tasklet
    yielded = self.generator.throw(type(error), error, traceback)
  File "/tba/src/backend/common/queries/database_query.py", line 128, in _do_query
    yield CachedQueryResult(id=cache_key, result=query_result).put_async()
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/google/cloud/ndb/tasklets.py", line 311, in _advance_tasklet
    yielded = self.generator.throw(type(error), error, traceback)
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/google/cloud/ndb/model.py", line 5437, in put
    ds_key = yield _datastore_api.put(ds_entity, kwargs["_options"])
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/google/cloud/ndb/tasklets.py", line 311, in _advance_tasklet
    yielded = self.generator.throw(type(error), error, traceback)
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/google/cloud/ndb/_datastore_api.py", line 379, in put
    key_pb = yield batch.put(entity_pb)
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/google/cloud/ndb/tasklets.py", line 311, in _advance_tasklet
    yielded = self.generator.throw(type(error), error, traceback)
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/google/cloud/ndb/_retry.py", line 96, in retry_wrapper
    raise error
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/google/cloud/ndb/_retry.py", line 82, in retry_wrapper
    result = yield result
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/google/cloud/ndb/tasklets.py", line 311, in _advance_tasklet
    yielded = self.generator.throw(type(error), error, traceback)
  File "/tmp/tmpFe5C3k/lib/python3.8/site-packages/google/cloud/ndb/_datastore_api.py", line 98, in rpc_call
    raise error
google.api_core.exceptions.InvalidArgument: 400 The value of property "result" is longer than 1048487 bytes.