From e41efdf98b4a87deef543f1a27100720739148de Mon Sep 17 00:00:00 2001 From: Daniel Volz Date: Mon, 16 Feb 2026 22:03:11 +0100 Subject: [PATCH] fix: disable nginx temp file buffering for proxied responses (#230) Replace increased proxy buffer sizes with proxy_max_temp_file_size 0 to stream upstream responses directly to clients instead of buffering to temp files. Eliminates warnings for large medication images without increasing per-connection RAM usage. --- frontend/nginx.conf | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/nginx.conf b/frontend/nginx.conf index 6caa2ce..a51c3cb 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -44,10 +44,8 @@ server { proxy_read_timeout 60s; proxy_send_timeout 60s; - # Increase proxy buffers to avoid buffering images/responses to temp files - # Default is 8 x 4k/8k which is too small for medication images - proxy_buffer_size 16k; - proxy_buffers 8 256k; - proxy_busy_buffers_size 512k; + # Prevent buffering upstream responses to temp files (images can be large) + # nginx streams directly to client instead of buffering the full response + proxy_max_temp_file_size 0; } }