I have a cloud function running in GCP with Firebase. The function is very simple and storing some data in Firestore.
I see in the logs the following error:
Error: cannot communicate with function. Function invocation was interrupted.
It happens in less than 1% of the requests, but I can't understand why they're happening.
Cloud Functions deployment can fail if the entry point to your code, that is, the exported function name, is not specified correctly. Your source code must contain an entry point function that has been correctly specified in your deployment, either via Cloud console or Cloud SDK.
Functions are stateless, and the execution environment is often initialized from scratch, which is called a cold start. Cold starts can take significant amounts of time to complete.
Requests on your Firebase Hosting site can be proxied to specific HTTP functions. This also allows you to use your own custom domain with an HTTP function.
When people (@doug-stevenson) are tempted to answer that we shouldn't be asking service questions, please remember that we're posting here because we don't know that. We assume it is an error in our code or configuration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With