Hello everyone,
I'm having a strange behaviour with parallel execution of the cloud functions :
My function receives a first request, before finishing processing this latter, another request is coming. So it creates a different instance to handle it.
Th problem I have is that the first instance logs finished with status ok finished, even though the request was not finished.
1. Did I missed something in the configuration maybe ?
2. Can I set up a delay between function's invocations ( in order to have more logs) ?
3. Any thoughts about this ?
Thanks in advance,
Solved! Go to Solution.
Hi @Joseph95,
Cloud Functions handle incoming requests by assigning it to an instance, in case the volume of requests increases, the Cloud Functions will start new instances to handle the requests.
Note: An extremely rapid increase in inbound traffic can intermittently cause some requests to fail with an HTTP code of 500. This is because the requests time out in the pending queue while waiting for new instances to be created. Configuring your workload so that it ramps traffic up gradually over the course of a minute can help with this issue. Also see Troubleshooting Cloud Functions for more information.
You may want to check about Using Pub/Sub to trigger a Cloud Function
Thanks
Christian
Hi @Joseph95,
Cloud Functions handle incoming requests by assigning it to an instance, in case the volume of requests increases, the Cloud Functions will start new instances to handle the requests.
Note: An extremely rapid increase in inbound traffic can intermittently cause some requests to fail with an HTTP code of 500. This is because the requests time out in the pending queue while waiting for new instances to be created. Configuring your workload so that it ramps traffic up gradually over the course of a minute can help with this issue. Also see Troubleshooting Cloud Functions for more information.
You may want to check about Using Pub/Sub to trigger a Cloud Function
Thanks
Christian