Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECONNRESET errors with using REST transport in GCF #1525

Open
alexander-fenster opened this issue Nov 15, 2023 · 1 comment
Open

ECONNRESET errors with using REST transport in GCF #1525

alexander-fenster opened this issue Nov 15, 2023 · 1 comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: cleanup An internal cleanup or hygiene concern.

Comments

@alexander-fenster
Copy link
Contributor

alexander-fenster commented Nov 15, 2023

As reported in googleapis/nodejs-firestore#1943, @google-cloud/firestore used in GCF in REST mode {preferRest: true}, which translates to {fallback: 'rest'}, often results in ECONNRESET error. We need to investigate what might be going on.

@alexander-fenster alexander-fenster added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Nov 15, 2023
@alexander-fenster alexander-fenster self-assigned this Nov 15, 2023
@alexander-fenster alexander-fenster removed their assignment May 24, 2024
@danielbankhead danielbankhead self-assigned this Jun 4, 2024
@danielbankhead
Copy link
Member

It appears we have 2 networking libraries in the fallback: 'rest' path:

  • google-auth-library
  • node-fetch

google-auth-library currently has retries for the ECONNRESET concern, however the node-fetch path does not. Perhaps a way forward is to swap node-fetch with gaxios with a retry configuration, here:

const fetch = hasWindowFetch()
? window.fetch
: (nodeFetch as unknown as NodeFetchType);

@danielbankhead danielbankhead added priority: p3 Desirable enhancement or fix. May not be included in next release. type: cleanup An internal cleanup or hygiene concern. and removed priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jun 7, 2024
@danielbankhead danielbankhead removed their assignment Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

2 participants