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.
This commit is contained in:
+3
-5
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user