Python Firebase Admin SDK Listener sometimes throws Bad Gateway errors after DB is updated
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu với đường dẫn listener của Python Realtime Database được db.reference(...).listen(exampleFunc) sử dụng và phản hồi requests.exceptions.HTTPError 502 được báo cáo sau các lần cập nhật cơ sở dữ liệu. Kiểm tra thiết lập listener cùng mọi project ID và timestamp hiện có, đối chiếu với log phía máy chủ. Công việc được xem là hoàn tất khi xác định được nguyên nhân có thể tái hiện hoặc ghi lại cách nên xử lý lỗi xảy ra không liên tục.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[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)
- Ngôn ngữ chính
- Python
- Star
- 1.2k
- Fork
- 359
- Merge trung bình
- 3 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của firebase/firebase-admin-python
-
api: remoteconfig
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
firebase/firebase-admin-python#957 · 1 bình luận ·
-
api: database type: feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
firebase/firebase-admin-python#978 · 1 bình luận ·
-
[FR] Support VERIFY_AND_CHANGE_EMAIL in generate_email_action_link (parity with firebase-admin-node) Đang mởapi: auth
firebase/firebase-admin-python#949 · 2 bình luận · 1 reaction · 1 người được giao ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 43/100
firebase/firebase-admin-python#945 · 1 bình luận · 1 reaction ·
Tất cả issue của firebase/firebase-admin-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
anthropics/skills#1811 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
speaches-ai/speaches#678 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
datalayer/mcp-compose#42 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
conda-forge/spacy-feedstock#177 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
UKGovernmentBEIS/inspect_evals#2523 ·