Failed to upload large file such as 513M

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 20.0.0
Operating system and version (eg, Ubuntu 20.04): Centos7.9
Apache or nginx version (eg, Apache 2.4.25): 1.22.0
PHP version (eg, 7.4): 7.4

The issue you are facing:
I have a new deploy Nextcloud and use minio as primary storage.
I have a problem when upload large file to Nextcloud. There are error about reset by peer as log below. There is no issue when upload smaller file.
However I’ve set the upload_max_filesize and post_max_size.

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

php74 -i | grep max
log_errors_max_len => 1024 => 1024
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
post_max_size => 10G => 10G
upload_max_filesize => 10G => 10G
ldap.max_links => Unlimited => Unlimited
mysql.max_links => Unlimited => Unlimited
mysql.max_persistent => Unlimited => Unlimited
mysqli.max_links => Unlimited => Unlimited
mysqli.max_persistent => Unlimited => Unlimited
session.gc_maxlifetime => 1440 => 1440
unserialize_max_depth => 4096 => 4096
opcache.max_accelerated_files => 10000 => 10000
opcache.max_file_size => 0 => 0
opcache.max_wasted_percentage => 5 => 5

The output of your Apache/nginx/system log in /var/log/____:

2022/11/02 17:23:37 [error] 13075#13075: *53 client intended to send too large body: 537919488 bytes, client


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE

by default php -i takes its value from php-cli and not php-apache.

please check the output of

php -c /etc/php/7.4/apache2/php.ini -i | grep max

also I advice to use the .user.ini file in your nc root installation folder. simply put this

output_buffering=0
memory_limit = 1024M
upload_max_filesize = 10G

in there should work. adjust as needed.

Thanks for your advice.
However I have set these.

[root@nextcloud ~]# php74 -c /etc/opt/remi/php74/php.ini -i |grep max
log_errors_max_len => 1024 => 1024
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
post_max_size => 10G => 10G
upload_max_filesize => 10G => 10G
ldap.max_links => Unlimited => Unlimited
mysql.max_links => Unlimited => Unlimited
mysql.max_persistent => Unlimited => Unlimited
mysqli.max_links => Unlimited => Unlimited
mysqli.max_persistent => Unlimited => Unlimited
session.gc_maxlifetime => 1440 => 1440
unserialize_max_depth => 4096 => 4096
opcache.max_accelerated_files => 10000 => 10000
opcache.max_file_size => 0 => 0
opcache.max_wasted_percentage => 5 => 5

[root@nextcloud-app-a nextcloud]# cat .user.ini
mbstring.func_overload=0
always_populate_raw_post_data=-1
default_charset=‘UTF-8’
output_buffering=0
upload_max_filesize=10G
post_max_size=10G

there is currently insufficient info to help.

could you provide logging of apache/nc when upload fails.