WebDAV App - "413 Request Entity Too Large"

EpicLPer

Cadet
Joined
Jul 31, 2023
Messages
4
Heya!

I'm trying to set up WebDAV in order to use TrueNAS as a Destination for Hyper Backup on my Synology, however during my testing I found something pretty odd.
Whenever I'm trying to upload a ~1GB or above file I always get an error back that is either "413 Request Entity Too Large" (via WinSCP) or on my Synology it simply throws the error "The file size exceeds the file upload limit of this cloud service".

Is there any way to increase the upload size on the WebDAV app? I've also tried to set up other Apps like RSync or MinIO, tho RSync is too insecure the way it works from Synology to TrueNAS and MinIO I've never configured before.

Thanks already for your help!
 

Policy0702

Cadet
Joined
Aug 3, 2023
Messages
9
I have encountered errors like that when using reverse proxies. Web servers have a setting for the max file size and the defaults are very low so it will have to be set higher.

Do you know how many webservers the WebDAV traffic is traversing? There would be one on the WebDAV host and then each proxy will have to be checked as well.

Could you share more info on your network topology?
 

EpicLPer

Cadet
Joined
Jul 31, 2023
Messages
4
I have encountered errors like that when using reverse proxies. Web servers have a setting for the max file size and the defaults are very low so it will have to be set higher.

Do you know how many webservers the WebDAV traffic is traversing? There would be one on the WebDAV host and then each proxy will have to be checked as well.

Could you share more info on your network topology?
I've accessed it directly, no reverse proxy etc. before it except that the WebDAV app is a docker container, so maybe there's a limit set.
I've found a workaround for my case with rsync now tho so I don't fully need this anymore :)
 

Policy0702

Cadet
Joined
Aug 3, 2023
Messages
9
Good! Glad you found a workaround.
For others who find this thread I want to point out:
1. WebDAV runs over http and "413 Request Entity Too Large" is an http error.
2. The max file size is set in the webserver. (e.g. nginx or apache)
There is no need for me to go into detail since there are hundreds of guides online. (Just search for "how to solve 413")
3. Depending on your configuration, there is actually a good chance that your docker container is being proxied by the webserver on the host.
4. I would think should be a graphical setting somewhere that allows you to set this on TrueNAS. Should be somewhere in your container/app settings however I can't research this without more details on this setup.


I currently don't have enough info on this setup to definitively say how this is working in this case.
 
Joined
Sep 27, 2023
Messages
6
WebDAV is the only solution suitable for my condition, I really need it properly functioning. I'm also in need of help.

I've tried editing /usr/local/apache2/conf/httpd.conf or create .conf file in /usr/local/apache2/conf/Includes/ via pod shell, docker cp and kubectl cp , but all encountered read-only filesystem error.
 
Joined
Sep 27, 2023
Messages
6
I would try this.

In the app settings, add two environment variables.
1. upload_max_size with value 16G
2. post_max_size with value 16G
But exactly where do I try to adjust these two variables?
Because the WebDAV service that runs on TrueNAS Scale will be discontinued. The need to migrate to the APP docker solution is being oriented as a solution.
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
But exactly where do I try to adjust these two variables?
Because the WebDAV service that runs on TrueNAS Scale will be discontinued. The need to migrate to the APP docker solution is being oriented as a solution.
Yes you need to do it in the app when setting it up. There is a drop-down called “Extra Environment Variables”

You can add them under there.
 
Joined
Sep 27, 2023
Messages
6
Here in my environment, this field is identified as "Additional Environment Variables".
I think I had already tested these parameters a few weeks ago, but I don't remember if I used exactly these parameters.
I'll test it and let you know the news.
 
Joined
Sep 27, 2023
Messages
6
I would try this.

In the app settings, add two environment variables.
1. upload_max_size with value 16G
2. post_max_size with value 16G
I carried out the test with these variables that you suggested, but there were no changes in behavior. There is a transfer of only around 150MB to 200MB, a varied time interval, a few seconds.

According to the documentation, "Additional Environment Variables" are for the docker environment with 3 variable options:
-WEBDRIVE_URL
-WEBDRIVE_PASSWORD_FILE
-WEBDRIVE_MOUNT
 
Joined
Sep 27, 2023
Messages
6
Here are some logs:
Pod Logs
Set font size:
Application Name:webdavPod Name:webdav-79fc69d5f4-njq4pContainer Name:webdav
2023-09-28 10:05:48.980745+00:00[Thu Sep 28 10:05:48.979968 2023] [ssl:warn] [pid 1:tid 139727531550592] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
2023-09-28 10:05:48.984739+00:00[Thu Sep 28 10:05:48.982997 2023] [mpm_event:notice] [pid 1:tid 139727531550592] AH00489: Apache/2.4.57 (Unix) OpenSSL/3.0.9 configured -- resuming normal operations
2023-09-28 10:05:48.984877+00:00[Thu Sep 28 10:05:48.983086 2023] [core:notice] [pid 1:tid 139727531550592] AH00094: Command line: 'httpd -D FOREGROUND'
2023-09-28 10:06:40.831027+00:00[Thu Sep 28 10:06:40.830268 2023] [dav:error] [pid 8:tid 139727424448192] (-102)Unknown error -102: [client 10.20.30.3:46184] An error occurred while reading the request body (URI: /BACLKUP/SERVER/VHDs/VM.vbk) [-102, #0]
2023-09-28 10:06:42.379685+00:00[Thu Sep 28 10:06:42.379408 2023] [dav:error] [pid 92:tid 139727399270080] (-102)Unknown error -102: [client 10.20.30.3:55769] An error occurred while reading the request body (URI: /BACLKUP/SERVER/VHDs/VM.vbk) [-102, #0]
2023-09-28 10:06:43.814358+00:00[Thu Sep 28 10:06:43.814063 2023] [dav:error] [pid 9:tid 139727340521152] (-102)Unknown error -102: [client 10.20.30.3:39416] An error occurred while reading the request body (URI: /BACLKUP/SERVER/VHDs/VM.vbk) [-102, #0]
 
Top