1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ときどき遅くなるCloud Functions for Firebase

Last updated at Posted at 2019-08-29

Firebaseの監視用で軽い「Cloud Functions for Firebase」を作成して(StackDriverではなく)外部から呼んでいるのですが、稀にTimeoutエラーが発生してます。

その時のCloud Functionsのログをみるとこんな感じ。

Function execution took 42684 ms, finished with status code: 200

42秒か〜〜

普段はこんな感じです。

Function execution took 188 ms, finished with status code: 200

Firebase Status Dashboardで確認しても障害発生はありません。

この監視用アクセスは「Hosting(rewrites) <-> Functions <-> Firestore」の流れで、三ヶ所まとめて死活監視してるんですが、Functions <-> Firestoreの遅延の可能性もあります。

遅い時はログに何か別の情報を出力したほうがいいかもしれませんね。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?