#proxy_buffering

Charims :archlinux: :sway: :vim:charims@social.pcwideopen.com
2021-03-23
I'm having issues with pleroma webui and even some user-uploaded content. API seems to be working, or I imagine I couldn't post this with husky.

I see the following in my nginx logs

2021/03/23 00:02:11 [error] 179593#179593: *84 upstream prematurely closed connection while reading upstream, client: 192.168.3.1, server: social.pcwideopen.com, request: "GET /static/css/app.77b1644622e3bae24b6b.css HTTP/2.0", upstream: "http://192.168.3.84:4000/static/css/app.77b1644622e3bae24b6b.css", host: "social.pcwideopen.com", referrer: "https://social.pcwideopen.com/"

I have tweaked these settings back and forth trying to resolve this.

location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering on;
#proxy_set_header Connection "";
#proxy_redirect off;
#proxy_request_buffering off;
#proxy_buffering off;
proxy_read_timeout 300s;
proxy_connect_timeout 300s;
proxy_buffer_size 4k;
proxy_buffers 256 4k;
#proxy_set_header X-Forwarded-For $remote_addr;
# this is explicitly IPv4 since Pleroma.Web.Endpoint binds on IPv4 only
# and `localhost.` resolves to [::0] on some systems: see issue #930
proxy_pass http://192.168.3.84:4000;
client_max_body_size 16m;
}

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst