Call to Firestore getting timed out from the docker container.
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
调研方向
从 src/async_client_messaging_app/settings/firebase_manager.py 中的 initialize_firebase 以及 traceback 中显示的 doc_ref.set 调用开始。比较本地环境中的 Firestore 和 OAuth 请求与 Docker 容器中的请求,包括容器的网络配置。完成的标准是确定 DeadlineExceeded 错误的可复现原因,并记录经过验证的修复方法。
由索引模型根据 Issue 内容生成。
描述
I'm facing an issue while creating a single record in the Google Firestore document from the docker, whereas the same code works fine in my local.
Below is the error I am getting:
2024-03-06 08:44:30,390 [google.auth.transport.requests|365|140737231338496|Thread-1] | requests.py:__call__:185 (DEBUG) - Making request: POST https://oauth2.googleapis.com/token
2024-03-06 14:15:29 Traceback (most recent call last):
2024-03-06 14:15:29 File "/usr/local/bin/gunicorn", line 8, in <module>
2024-03-06 14:15:29 sys.exit(run())
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 67, in run
2024-03-06 14:15:29 WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 236, in run
2024-03-06 14:15:29 super().run()
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 72, in run
2024-03-06 14:15:29 Arbiter(self).run()
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 58, in __init__
2024-03-06 14:15:29 self.setup(app)
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 118, in setup
2024-03-06 14:15:29 self.app.wsgi()
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
2024-03-06 14:15:29 self.callable = self.load()
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
2024-03-06 14:15:29 return self.load_wsgiapp()
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
2024-03-06 14:15:29 return util.import_app(self.app_uri)
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/gunicorn/util.py", line 371, in import_app
2024-03-06 14:15:29 mod = importlib.import_module(module)
2024-03-06 14:15:29 File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
2024-03-06 14:15:29 return _bootstrap._gcd_import(name[level:], package, level)
2024-03-06 14:15:29 File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2024-03-06 14:15:29 File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2024-03-06 14:15:29 File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
2024-03-06 14:15:29 File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
2024-03-06 14:15:29 File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2024-03-06 14:15:29 File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2024-03-06 14:15:29 File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
2024-03-06 14:15:29 File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
2024-03-06 14:15:29 File "<frozen importlib._bootstrap_external>", line 850, in exec_module
2024-03-06 14:15:29 File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
2024-03-06 14:15:29 File "/a360/async_client_messaging_api/src/async_client_messaging_app/__init__.py", line 4, in <module>
2024-03-06 14:15:29 from . import api # noqa: E402
2024-03-06 14:15:29 File "/a360/async_client_messaging_api/src/async_client_messaging_app/api/__init__.py", line 1, in <module>
2024-03-06 14:15:29 from . import resources
2024-03-06 14:15:29 File "/a360/async_client_messaging_api/src/async_client_messaging_app/api/resources/__init__.py", line 1, in <module>
2024-03-06 14:15:29 from . import acm_client, acm_server, topic_management
2024-03-06 14:15:29 File "/a360/async_client_messaging_api/src/async_client_messaging_app/api/resources/acm_client.py", line 6, in <module>
2024-03-06 14:15:29 from async_client_messaging_app.db import firestore
2024-03-06 14:15:29 File "/a360/async_client_messaging_api/src/async_client_messaging_app/db/firestore.py", line 5, in <module>
2024-03-06 14:15:29 from async_client_messaging_app import app
2024-03-06 14:15:29 File "/a360/async_client_messaging_api/src/async_client_messaging_app/app.py", line 21, in <module>
2024-03-06 14:15:29 firebase_app.initialize_firebase()
2024-03-06 14:15:29 File "/a360/async_client_messaging_api/src/async_client_messaging_app/settings/firebase_manager.py", line 54, in initialize_firebase
2024-03-06 14:15:29 doc_ref.set({"first": "Ada", "last": "Lovelace", "born": 1815})
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/google/cloud/firestore_v1/document.py", line 167, in set
2024-03-06 14:15:29 write_results = batch.commit(**kwargs)
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/google/cloud/firestore_v1/batch.py", line 59, in commit
2024-03-06 14:15:29 commit_response = self._client._firestore_api.commit(
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/google/cloud/firestore_v1/services/firestore/client.py", line 1371, in commit
2024-03-06 14:15:29 response = rpc(
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/google/api_core/gapic_v1/method.py", line 131, in __call__
2024-03-06 14:15:29 return wrapped_func(*args, **kwargs)
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/google/api_core/retry/retry_unary.py", line 293, in retry_wrapped_func
2024-03-06 14:15:29 return retry_target(
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/google/api_core/retry/retry_unary.py", line 153, in retry_target
2024-03-06 14:15:29 _retry_error_helper(
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/google/api_core/retry/retry_base.py", line 212, in _retry_error_helper
2024-03-06 14:15:29 raise final_exc from source_exc
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/google/api_core/retry/retry_unary.py", line 144, in retry_target
2024-03-06 14:15:29 result = target()
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/google/api_core/timeout.py", line 120, in func_with_timeout
2024-03-06 14:15:29 return func(*args, **kwargs)
2024-03-06 14:15:29 File "/usr/local/lib/python3.9/site-packages/google/api_core/grpc_helpers.py", line 78, in error_remapped_callable
2024-03-06 14:15:29 raise exceptions.from_grpc_error(exc) from exc
2024-03-06 14:15:29 google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded
Any leads for fixing this would be appreciated?
- 主要语言
- Python
- 星标
- 1.2k
- 派生
- 359
- 平均合并
- 3 天 9 小时
- 30 天内合并 PR
- 3
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
firebase/firebase-admin-python 的其他 Issue
-
api: remoteconfig
难度 2/5 1-3 小时 新手友好度 75/100
firebase/firebase-admin-python#957 · 1 条评论 ·
-
api: database type: feature request
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 4/5 3-5 天 新手友好度 45/100
firebase/firebase-admin-python#978 · 1 条评论 ·
-
[FR] Support VERIFY_AND_CHANGE_EMAIL in generate_email_action_link (parity with firebase-admin-node) 未关闭api: auth
firebase/firebase-admin-python#949 · 2 条评论 · 1 个 reaction · 已指派 1 人 ·
-
难度 4/5 3-5 天 新手友好度 43/100
firebase/firebase-admin-python#945 · 1 条评论 · 1 个 reaction ·
查看 firebase/firebase-admin-python 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 70/100
canonical/paas-charm#368 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
tech debt
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 1/5 1 小时以内 新手友好度 90/100
StevenBlack/hosts#3256 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
qualcomm/qai-appbuilder#275 ·