LoginSignup
4
3

More than 5 years have passed since last update.

Nginx + GoFCGIでreadv() failed (104: Connection reset by peer) while reading upstream

Posted at

Nginx

upstream container-sentry { server go:9000; }
location / {                       
   proxy_set_header Host $host;    
   fastcgi_pass  container-sentry;         
   include       fastcgi_params;   
   break;                          
 }                                 

Go

listener, _ := net.Listen("tcp", ":9000")
fcgi.Serve(listener, nil)

いろいろ端折ってますが、こんなかんじで動かしてた時

readv() failed (104: Connection reset by peer) while reading upstream

とおこなれ何これ?何文句あるの?
ッて思ってたけど

location / {                       
   proxy_set_header Host $host;    
   fastcgi_pass  container-sentry; 
+   fastcgi_keep_conn on;           
   include       fastcgi_params;   
   break;                          
 }    

で、かいけつ

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3