edit by @stephenplusplus
If you're just joining the conversation...
Here is where we stand: We have disabled the forever agent by default in Cloud Function environments. If you un- and re-install @google-cloud/storage, you will pick up the new behavior automatically.
Original Post
Environment details
- OS: Google Cloud Functions (not an OS. I know)
- Node.js version: LTS
- npm version: LTS
- google-cloud-node version: HEAD
Steps to reproduce
- git clone [email protected]:firebase/functions-samples.git
- cd generate-thumbnail
- firebase init
- firebase deploy
- play with app for a while and observe that it gets into a mode that always fails with ECONNRESET
Theory
I've noticed this in my own Cloud Functions and only in those that use google-cloud-node. I think the socket is dying between requests when the Cloud Functions environment is throttled. This should be OK, but I suspect the google-cloud-node module needs to add an extra error case here. I'll write a pull request to that effect.
edit by @stephenplusplus
If you're just joining the conversation...
Here is where we stand: We have disabled the forever agent by default in Cloud Function environments. If you un- and re-install @google-cloud/storage, you will pick up the new behavior automatically.
Original Post
Environment details
Steps to reproduce
Theory
I've noticed this in my own Cloud Functions and only in those that use google-cloud-node. I think the socket is dying between requests when the Cloud Functions environment is throttled. This should be OK, but I suspect the google-cloud-node module needs to add an extra error case here. I'll write a pull request to that effect.