We are running a service with the structure of
Client (Web, App) -> AWS API Gateway -> GCP Cloud Run (called by public URL).
The following error occurs when proxying a request from the API Gateway to the GCP Cloud Run, which is logged in the AWS log.
'Execution failed due to a network error communicating with endpoint: Connection reset by peer'
Not long after starting proxy the request (500ms), the message is logged and the API Gateway returns a Http 504 response to the Client App.
I don't think it's a timeout-related problem because it generated the error in 0.5 seconds. And this happens intensively at a very specific time.
As far as I know, the 'Connection reset by peer' error is related to the socket queue size of the server, what can I do to solve the problem in Cloud Run?
Or if the cause of the problem is different from what I thought, I would appreciate it if you could let me know the cause.
Hi @Kbb ,
Welcome to Google Cloud Community!
"Connection reset by peer" in Cloud Run typically indicates that the server closed the connection unexpectedly due to reasons like application crashes, timeouts, or network issues. This error arises when an application has an active TCP connection to a peer on the network, and that peer unexpectedly terminates the connection.
Here are several methods that you can try that may help to address this issue:
I hope the above information is helpful.