nginx Reverse Proxy in front of apache webdav upload file Problems

In a nutshell:
I use an apache2 as webdav server and have a nginx reverse proxy in front of it.
The download of larger files (~ 6 GB) works without problems only the upload of larger files (already from 450 MB) aborts exactly at the EOF with the error message "65 client intended to send too large body " (on nginx).

I tested all possible settings like client_max_body_size, proxy_buffering off; unfortunately without success. If I run apache2 without nginx reverse proxy everything works as expected.

Thanks for your help

reredok
LVL 4
reredokIT ConsultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ravi Kumar AtreyCloud Specialist- AzureCommented:
You need to configure upload size at every level, like in configuration of your application platform like if application is in php then it should be configured in PHP.ini file, then ngnix configuration and then apach's configuration.

Then you need to try.

Please do this and let me know if you have already done?
reredokIT ConsultantAuthor Commented:
except for the configuration of php I configured it in nginx and apache2.
Ravi Kumar AtreyCloud Specialist- AzureCommented:
Please do in PHP configuration as well.

upload_max_filesize=
post_max_size=
Price Your IT Services for Profit

Managed service contracts are great - when they're making you money. Yes, you’re getting paid monthly, but is it actually profitable? Learn to calculate your hourly overhead burden so you can master your IT services pricing strategy.

reredokIT ConsultantAuthor Commented:
php isn't installed: neither on the nginx nor apache server
Ravi Kumar AtreyCloud Specialist- AzureCommented:
ok.. so how are you trying to upload, I mean what you are using to upload files, directly under your application or any some ftp sort of tool?
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Increasing client_max_body_size should fix this.

Likely best to install inotify-wait tools + watch all your config files. Then restart NGINX + ensure config file where you added the client_max_body_size change is actually read when NGINX restarts.
reredokIT ConsultantAuthor Commented:
@Ravi Kumar Atrey
Sorry, my information was a quick shot again.
Apache2 runs "of course" a webdav and nginx serves as an accelerator

@David Favor
client_max_body_size 2G; 20G; 200G; (nginx.conf, ../site-available/reserve-proxy.conf)
I tested in scope locaction, server, http and so on.

It must actually cause nginx the problem there without, so apache2 "alone" with webdav does not have the problem.
Prabhin MPDevOps EngineerCommented:
client_max_body_size        50m;

check this , this should solve the issue
reredokIT ConsultantAuthor Commented:
here you will find further information. Unfortunately the upload to the webdav (apache2) via nginx still does not work.

monitoring filesaccess nginx:
/etc/nginx/nginx.conf OPEN
/etc/nginx/nginx.conf ACCESS
/etc/nginx/sites-available/reverse-proxy.conf OPEN
/etc/nginx/sites-available/reverse-proxy.conf ACCESS
/etc/nginx/sites-available/reverse-proxy.conf CLOSE_NOWRITE,CLOSE
/etc/nginx/nginx.conf CLOSE_NOWRITE,CLOSE

client_max_body_size in nginx files (client_max_body_size 50G;)
grep -ril 'client_max_body_size' /etc/nginx
/etc/nginx/sites-available/reverse-proxy.conf
/etc/nginx/nginx.conf

webdav-client-error
webdav-client (carot-dav)

/var/log/nginx/error.log
2019/01/18 08:17:32 9987#9987: *27 client intended to send too large body: 104857600 bytes, client: 37.209.113.138, server: ......., request: "PUT /webdav/DATEV/KassenundWarenerfassung/test/K$ ....
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
You said, "I tested in scope locaction, server, http and so on."

Using inotifywait to verify the files your changing are actually be re-ingested, based on however you're restarting all your services.
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Tip: NGINX as an accelerator. Rarely does this actually occur.

Tip: For WebDav access, all caching/acceleration should be disabled, as caching will either slow WebDav to a crawl (much duplicate i/o) or completely break your WebDav access (as you'll be working on cached copies of files, rather than real copies).

If only one person is using WebDav, NGINX will just slow down access.

If many people are attempting to access the same resource, you'll likely end up with all manner of subtle problems where people are seeing + changing various versions of data.

I always use raw Apache, to keep my life simple.

If you're using the Apache 2.4 branch, then you'll be surprised how much faster Apache runs over NGINX, if you actually speed test every layer of your LAMP Stack.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.