Welcome! Log In Create A New Profile


[PATCH] Do not break downstream connection on proxy_cache write error

May 02, 2022 09:54AM
Hi all, this is the first time i'm submitting a patch for Nginx, i hope i'm
doing this correctly, apologies if not :)
(i want to provide some context behind the patch, so i'm following up the
patch with a message sent directly to the group, using the same topic, hope
it will end up in the right thread)

This is a fix for: https://trac.nginx.org/nginx/ticket/1945

In short: when HTTP proxy_pass is used with proxy_cache and while writing
the response to the cache the write fails (for example target disk is full)
- Nginx closes the downstream connection (the response breaks).

With this change, in this situation (when a cache write fails):
* the downstream connection is not closed (response continues to be sent
from upstream to the client)
* Nginx stops attempting to write this response to the cache
* Nginx deletes the temporary cache file after the response is fully served
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

[PATCH] Do not break downstream connection on proxy_cache write error

kipras 614 May 02, 2022 09:54AM

Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 328
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready