firebase-admin-node icon indicating copy to clipboard operation
firebase-admin-node copied to clipboard

setConnectTimeout for firebase admin 8.12.1

Open darshankaarki opened this issue 5 years ago • 4 comments

Does the firebase node admin ask have any connectTimeout property?

While sending notification to some of my registration token it takes more than 2 minutes and then times out. This is slowing down our process a lot.

darshankaarki avatar Aug 02 '20 04:08 darshankaarki

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar Aug 02 '20 04:08 google-oss-bot

There's a 10s default timeout on all FCM requests. Unfortunately there's no way to configure or change it as of today.

hiranya911 avatar Aug 03 '20 17:08 hiranya911

In my case it does not timeout in 10seconds but rather in 2 minutes. Can you help with why is it so?

I do not have any explicit retry mechanism? Is it something derived from node or express ? can you recommend of anything to reduce the timeout to 10s instead of 2 minutes?

darshankaarki avatar Aug 03 '20 19:08 darshankaarki

The 2 minute delay is probably coming from Express/Node.js due to a bad promise chain in your code. See https://github.com/expressjs/express/issues/3330 and https://nodejs.org/docs/latest-v8.x/api/http.html#http_server_timeout

hiranya911 avatar Aug 03 '20 21:08 hiranya911