Python Firebase Admin SDK Listener sometimes throws Bad Gateway errors after DB is updated
还没有人认领这个 Issue。
评估
调研方向
从 db.reference(...).listen(exampleFunc) 使用的 Python Realtime Database 监听器路径,以及数据库更新后报告的 requests.exceptions.HTTPError 502 响应开始。将监听器设置以及所有可用的项目 ID 和时间戳与服务器端日志进行对照检查。完成的标准是确定一个可复现的原因,或记录应如何处理该间歇性故障。
由索引模型根据 Issue 内容生成。
描述
[READ] Step 1: Are you in the right place?
Yes
[REQUIRED] Step 2: Describe your environment
- Operating System version: cos-stable-101-17162-40-5
- Firebase SDK version: latest?
- Firebase Product: realtime database, admin SDK
- Python version: 3.8
- Pip version: latest?
[REQUIRED] Step 3: Describe the problem
I have a database with customers data in it. When a new customer is added, a Firebase function triggers and updates '' to [user.uid]: to represent credits in my system. I have a google cloud VM that has an admin sdk database listener setup. Every month or so, after a new customer signs up, all of my listeners will randomly throw an error. The error I am seeing is:
requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://-default-rtdb.firebaseio.com/.json
I am using the realtime listener described in this stack overflow post top answer:
https://stackoverflow.com/questions/49863708/python-firebase-realtime-listener
Steps to reproduce:
Hard to reproduce, but I can also provide my project ID and exact times for the issue so that the Firebase team can look into server-side logs to see what the issue might be.
Relevant Code:
from firebase_admin import db
def exampleFunc(event):
try:
print(event)
except Exception as e:
return
#in startup function
listener1=db.reference('<listening location 1>').listen(exampleFunc)
listener2=db.reference('<listening location 2>').listen(exampleFunc)
- 主要语言
- 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
-
essnmx good first issue
难度 1/5 1 小时以内 新手友好度 95/100
-
难度 2/5 1-3 小时 新手友好度 65/100
syfoud/Simulated_Scepter#174 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
Giskard-AI/giskard-oss#2840 · 1 条评论 ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success 未关闭area: repo bug perceived difficulty: 2
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
yeti-platform/yeti#1380 ·