Reputation: 4271
I have a cloud function that seems to work fine, but for the first 15 seconds or so (after being triggered from a pubsub topic) seems to just bounce between restarting execution and finishing with status: connection error
Usually around the fifth try the function works fine. Here is the section of my logs that I'm noticing the issue in:
157979520007507 Function execution started functionName 157979520007507
157979520007507 Function execution took 2351 ms, finished with status: 'connection error'
157979520007507 Function execution started functionName 157979520007507
157979520007507 Function execution took 2284 ms, finished with status: 'connection error'
157979520007507 Function execution started functionName 157979520007507
157979520007507 Function execution took 2582 ms, finished with status: 'connection error'
157979520007507 Function execution started functionName 157979520007507
157979520007507 Function execution took 3286 ms, finished with status: 'connection error'
157979520007507 Function execution started functionName 157979520007507
and the next log entries indicate that the function is operating normally. I haven't found any documentation about what this error might mean, or what the connection is between (pubsub & my function?, function instances in different datacenters?)
Does anyone know what is going on here?
Upvotes: 0
Views: 2928
Reputation: 171
A Firebase Cloud Function was returning on every other execution:
Function execution took 7 ms, finished with status: 'connection error'
Re-installing firebase tools with: sudo npm install -g firebase-tools
and then re-deploying the function solved the problem.
Upvotes: 0
Reputation: 968
I was getting the same message and got it fixed by updating firebase-tools:
npm install -g firebase-tools
Hopefully, this works for you too.
Upvotes: 1