-
Notifications
You must be signed in to change notification settings - Fork 210
Node 8 functions ending with "finished with status: 'connection error'" #611
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
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Hi, I'm having similar issues since few hours. same message Any progress on your side @diginikkari ? |
@steven-tib I changed function runtime to node.js 10. This was desperate try because nothing else helped and for some reason it worked at least for me. So perhaps that is something you could try also. I'm bit worried on using node.js 10 because it's still in beta. But I figured that what I have to lose. I keep my functions in node 10 at least until this issue is solved. |
@diginikkari it seems that this workaround solves it, at least for now. I'm not confident either to use the node 10 beta so I hope they will find a way to fix this soon. Kiitos avusta! |
We're also experiencing this issue on a scheduled function that runs every minute. We first experienced the "connection error" result at 5:51pm PST on Jan 18th. As with the others in this thread, using the Node 10 Beta runtime fixes the issue, but that obviously is not an ideal solution. |
We are also getting this error on our Python cloud function :-/ The Node 10 workaround won't work for that one, any suggestion? |
Yep, had this issue started showing up recently for me, too. It's a nearly silent error as it didn't' trigger any of my existing alerting. I banged my head against this for many hours today, thinking I was doing something wrong while trying to process ~10,000 records (which I had been doing without issue in many cloud functions using the same shared code for weeks). Upgrading to the Node 10 (Beta) runtime also seems to work for me, but I'm not thrilled at being forced to update to a Beta product before I was prepared to do so. My dev machine and all CI/CD pipelines all run Node 8, so having using a different version only in production is bad. I really just wish that Firebase (or GCP) could get ahead of some of these problems by at least alerting us that there may be a problem, rather than us having to notice jobs "randomly" failing with no useful error codes. |
Same error on our environment. Is there a away to upgrade only one function to the Node 10, instead of upgrading full project ? |
@TomasMasiulis You can change runtime in https://console.cloud.google.com/functions select you project and select the function you wan't to change. Then press edit button and select Node.js 10 (Beta) from runtime dropdown. |
please note that two weeks ago, we found that when we switched our functions over to node 10 we saw a non-trivial increase of memory usage (a simple hello world exhibited this behavior, almost doubling the amount of memory needed). we reported our experience and measurements to the firebase team and their support channel acknowledged that this is a beta product and encouraged us to stick with node 8. we are also experiencing this error, but are hesitant to use the workaround until we can determine that the memory usage matches that of node 8. |
We're also seeing this. Any word from Firebasers / Google? |
So, some of our more busy CF are really taking a hit: This log is from last night: (Filtered out the successful runs.)
Thank god we have work queues set up due to past unreliability issues. Still, we need to do extra work due to this :/ |
@diginikkari thanks a lot ! Cannot deploy function after changing runtime to Node.js 10 (Beta). Deployment failure: |
Also in case it slipped from someone: Cloud Functions is GA, Firestore is GA but Firestore Cloud Function Triggers are still in beta, as stated here:
https://firebase.google.com/docs/functions/firestore-events (at the bottom of the page.) |
We had the issue too, having raised a support case with GCP, this has now been reported to us as resolved and we're not seeing the error any more after having redpeloyed our node 8 funtctions. |
Two days ago, I deployed my clouds function again with minor changes in the code. I got 'connection error'. After looking at the code, I saw that this error only happened in functions which are:
PS: I'm using Node 8 |
I also got info from my support case that this has been internally fixed. I was not able to reproduce this anymore so closing it. I will redeploy my function with runtime node.js 8. |
Can verify that they reported as fixed for us too and we're not seeing the behavior anymore after full redeploy. |
@diginikkari I'm still getting this error. Is there any way to get a work around it? or how to resolve it? |
@ciphereck Issue which affected this error for me was some firebase internal issue which they fixed. I suggest that you test with node.js 10 as it was one solution when I had the issue. Functions are in anycase now moving from node.js 8 to node.js 10. If that doesn't help, be in contact with firebase support. |
I don't think this has been fixed. It started happening to us of lately, with no code changes whatsoever. Just re-deploying those functions since we use automated deployments with Gitlab pipelines and have all functions deployed with every release. Firebase support team has no answers or acknowledgment of this problem just yet, very annoying. However our internal investigation points to the setup something similar to this comment from here #611 (comment), where the problem is happening consistently.
Migrating to Node 10 is not the solution just yet as it has lot of other implications. We plan to do the migration during end of the year, but until then we want the Node 8 runtime for cloud functions to be running as before. This sudden platform bug is more than undesirable. Any help, workaround, suggestions would be more than welcome. |
I also have a clear repro as well if it's useful. Fix was to move to Node 10. I guess Node 8 is more than deprecated 😄
|
Pretty much the same for me. Async function, getting large number of documents. Problem does not appear on our dev environment, with a significantly smaller number of documents. |
Just started seeing the same error on node 16 |
Firebase function triggered by firestore trigger is ending prematurely with
finished with status: 'connection error'
. There are no errors logged from actual function. Phase where function is exiting is varying. Most of the functions (lighter functions, with less communication to firestore) are finishing ok.When runtime is changed to "Node.js 10 Beta" functions are working correctly.
Region: europe-west1
Memory allocated: 1 GB
Timeout: 300 seconds
Related issues
#429 (already closed)
[REQUIRED] Version info
node:
node 8 (in cloud)
v12.4.0 (locally)
firebase-functions:
"firebase-functions": "3.3.0"
firebase-tools:
"firebase-tools": "7.12.1"
7.12.1
firebase-admin:
"firebase-admin": "8.9.1"
[REQUIRED] Test case
have not been able to extract code to reproduce it outside of my codebase. I have case where this is happening 100% of executions.
[REQUIRED] Steps to reproduce
Run function which is querying multiple documents from firestore using firebase-admin.
repo for reproducing issue:
https://github.com/diginikkari/case00032967
Reproduction steps:
npm run build; npm run deploy
npm run generate-fake-data
npm run create-order-copy
npm run logs
When function is using "node 8" it will end with
finished with status: 'connection error'
.When changing to "node 10" function is ending
finished with status: 'ok'
[REQUIRED] Expected behavior
Function is finished succesfully.
[REQUIRED] Actual behavior
Function is ending prematurely with
finished with status: 'connection error'
message.Were you able to successfully deploy your functions?
Yes, there were no errors with deployment.
log from errored execution.txt
The text was updated successfully, but these errors were encountered: