504 Deadline Exceeded: Deadline of 300.0s exceeded while calling target function

166 views
Skip to first unread message

Shakti Tripathi

unread,
Dec 22, 2023, 7:04:36 PM12/22/23
to Firebase Google Group
from google.cloud import firestore
import firebase_admin
from firebase_admin import credentials

FIREBASE_CREDENTIALS_FILE = '/<my path to credentials>'

FIREBASE_CREDENTIALS = credentials.Certificate(FIREBASE_CREDENTIALS_FILE)
firebase_admin.initialize_app(FIREBASE_CREDENTIALS, name='local')
db = firestore.Client()
collection = db.collection('chat_sessions')
chat_session_id='<session id>'

new_session_ref = collection.document()
new_session_data = {
    'participantIds': [1, 2],
    'createdAt': firestore.SERVER_TIMESTAMP
}
new_session_ref.set(new_session_data)

This is failing with 504 Deadline Exceeded error from past 2 days.

Before that, this same code was working 100%

Can anyone please help me out here ASAP!
Reply all
Reply to author
Forward
0 new messages