Skip to content

Nginx fastcgi_request_buffering should be enabled #854

@RisingOpsNinja

Description

@RisingOpsNinja

Description of the change

Some WebDAV clients can not upload files when Nginx and php-fpm is used: nextcloud/documentation#9574

To fix it the Nextcloud admin manual suggests to set nginx configuration fastcgi_request_buffering on (which is also the nginx default behavior), but the helm chart set it to off.

Benefits

When fastcgi_request_buffering is enabled, the entire request body is read from the client before sending the request to a FastCGI server.

Nginx adds a Content-Length header when chunked encoding is used to fix WebDAV client issues
Also it reduces timeouts during large uploads caused by php-fpm and nginx may shield php-fpm from resource exhaustion.

When fastcgi_request_buffering is disabled, the request body is sent to php-fpm immediately as it is received.

Possible drawbacks

Nginx writes the client requests body to a temporary file when it exceeds client_body_buffer_size (per default 8K or 16K depending on the platform).
Nginx could write temporary files on-disk as large as client_max_body_size:

client_max_body_size 10G;

Additional information

(none)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions