For the past month, I have been observing the behavior of the Cloud Run serverless scalability. When the total number of API requests exceeds the number of concurrent requests, Cloud Run takes too much time to create a new instance. Consequently, some API requests timeout, and there is a delay in redirecting the exceeded requests to the new instance. Although my API request timeout is set to 30 seconds, the API continues to return a 504 upstream timeout error. Please let me know if there are any settings missing in the Cloud Run configuration. My maximum concurrency request limit is set to 8, and I am running Node.js code on my server, which is single-threaded.
I appreciate your assistance in advance.
Thank you.
tried below server configuration to solve the problem.
1 cpu, 216 mb memory, 10 concurrent request, min instance : 2 and max 100 1 cpu, 216 mb memory, 8 concurrent request, min instance : 2 and max 100 1 cpu, 216 mb memory, 6 concurrent request, min instance : 2 and max 100 2 cpu, 512 mb memory, 4 concurrent request, min instance : 2 and max 100 4 cpu, 2 gb memory, 4 concurrent request, min instance : 2 and max 100