0

getting the following in nginx error.log when sending a grpc-go request.

2021/10/01 17:06:08 [info] 18799#18799: *9 recv() failed (104: Connection reset by peer) while processing HTTP/2 connection, client: 127.0.0.1, server: 0.0.0.0:50050

Weirdly, the above logging only happens some times, not always. Please let me know if you've seen this issue before and how to fix.

kaushal agrawal
  • 360
  • 3
  • 21

1 Answers1

0

Possible duplicates of Go http.Get, concurrency, and "Connection reset by peer"

One possible reason of this connection reset is that there's too much connection and nginx cannot handle

You can try to increase nginx connection limit by adding an event block in the nginx global or virtual host configuration. Then restart nginx.

events {
   worker_connections 2048;
}

Also try to see if your server is running slow at that time.

Source: https://ubiq.co/tech-blog/how-to-fix-nginx-worker-connections-are-not-enough/

Thanh Trung
  • 3,566
  • 3
  • 31
  • 42