See https://us-west-2.console.aws.amazon.com/cloudwatch/home?region=us-west-2#logsV2:log-groups/log-group/$252Faws$252Felasticbeanstalk$252Fmavedb2-prod-worker-env$252Fvar$252Flog$252Feb-docker$252Fcontainers$252Feb-current-app$252Fstdouterr.log/log-events/i-0d57424da8febff72
When we run worker jobs on stale connections they are constantly closed and cause mapping to fail. It seems this is related to the following lines:
|
class GeneNormalizerBuilder: |
|
"""Singleton constructor for Gene Normalizer instance.""" |
|
|
|
def __new__(cls) -> QueryHandler: |
|
"""Provide Gene Normalizer instance. Construct it if unavailable. |
|
|
|
:return: singleton instance of ``QueryHandler`` for Gene Normalizer |
|
""" |
|
if not hasattr(cls, "instance"): |
|
db = create_db() |
|
q = QueryHandler(db) |
|
cls.instance = q |
|
return cls.instance |
We should probably just create new instances of the db that do not have their connections closed instead of checking the instance state.
See https://us-west-2.console.aws.amazon.com/cloudwatch/home?region=us-west-2#logsV2:log-groups/log-group/$252Faws$252Felasticbeanstalk$252Fmavedb2-prod-worker-env$252Fvar$252Flog$252Feb-docker$252Fcontainers$252Feb-current-app$252Fstdouterr.log/log-events/i-0d57424da8febff72
When we run worker jobs on stale connections they are constantly closed and cause mapping to fail. It seems this is related to the following lines:
dcd_mapping2/src/dcd_mapping/lookup.py
Lines 160 to 172 in 374672a
We should probably just create new instances of the db that do not have their connections closed instead of checking the instance state.