-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add LimitRequestBody 0 to .htaccess #37696
Conversation
"LimitRequestBody 0" allows uploading files bigger than 1024MB, which seems to be the default apache webserver value. This is important as some browsers do not respect the chunking (for some of my Safari users this happens randomly) and the upload fails with the error "Expected filesize of 1207907122 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 0 bytes.". Signed-off-by: mgutt <marc@gutt.it>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that article, but finally it does not contain any explanation regarding the In addition the article describes solutions which shouldn't be needed at all as Nextcloud's chunking bypasses all those limits. With the default settings (10 MB chunking, 512MB PHP_UPLOAD_LIMIT/PHP_MEMORY_LIMIT) it was no problem to upload huge files to my servers for 99% of my users. Only a tiny amount of them had the problem that their browser randomly fail to chunk the files and by that those tiny amount hits the PHP, Apache and Proxy Server limits. So we try to create a workaround for random situations, which I think is ok as finally the user experience is the most important thing. I think we have to solutions to solve this: |
|
This is not a solution, it is only a workaround because the user has to create the following dirs with the proper perms BEFORE installing the container (unRAID paths as an example): /mnt/user/appdata/Nextcloud/etc And this file with the proper content: Even advanced users would now struggle as they can't know the perms and the needed content of the file before installing the container. So they will install the container first. Then they would create the file with the needed configs and add a new mounted path and restart the container. By that it is NOT possible to prepare the docker command (compose, docker run In addition this solution blocks all changes through future apache upgrades. And it does not make sense at all. I mean why does the container offer to change the |
What I was pointing out that this is a bug in the docker image and needs to be fixed there 😉 It works fine e.g. with https://github.com/nextcloud/all-in-one |
@szaimen why do you think this is an issue in the Docker image alone? This affects all installations running on Apache 2.4.53+. IMHO this should either be fixed in the |
Do you have a value in mind? If we add LimitRequestBody to our .htaccess file, you cannot override it anymore. |
I don't see a reason to have a limit at all.
|
We don't increase the limits for upload_max_filesize/post_max_size in server anymore.
We try to increase the max_execution_time for PHP automatically via set_time_limit (in the past also upload_max_filesize/post_max_size via ini_set). This mechanics is only available for some PHP configurations. |
Why shouldn't it be possible to set the value in httpd.conf by dockers entrypoint script?! |
@mgutt reworked my previous comment. |
"LimitRequestBody 0" allows uploading files bigger than 1024 MB, which seems to be the default apache webserver value. This is important as some browsers do not respect the chunking (for some of my Safari users this happens randomly) and the upload fails with the error "Expected filesize of 1207907122 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 0 bytes.".
In addition it allows setting a chunking size bigger than 1024 MB.
[Bug]: Expected filesize of X bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 0 bytes #37695