Python Firebase Admin SDK Listener sometimes throws Bad Gateway errors after DB is updated
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
調査の方向性
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時間
- マージ済み PR(30日)
- 3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 件 · 担当者 1 名 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 43/100
firebase/firebase-admin-python#945 · コメント 1 件 · リアクション 1 件 ·
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 ·