I can not make How To`s so I’ll post it here instead. You can deal with this as you like.
I have had problems now with several existing servers behind nginx based reverseproxys. Either they or nextcloud changed anything regarding the default “client_max_body_size”.
The issues I had with this is that uploads did not work even though php was configured correctly and all the other issues i found only tackled the request time.
For my webbrowser and client configurations on windows and linux I needed to set the “client_max_body_size” to my “upload_max_filesize” in the reverseproxy configuration. This has not been the case in the past.
Maybe I changed things that now require it but this was the only way to fix it for me, to manually set this as well as making the request time higher.
thank you sharing your findings. You didn’t provide many technical information so it’s hard to judge. For me upload_max_filesize = client_max_body_size sounds like uploads happen in one piece which means there is no “chunking”. while no chunking is expected for anonymous uploads in other cases chunking should address the problem ob overflowing request limit or connection timeout.
likely related discussions:
I’ll try to chronologicly share my findings an thought process.
I got a 504 timout when syncing a larger amount of files via the client. I tested with nextcloud and owncloud clients of different versions.
This problem remained for small or larger files with no real findings on what was the issue. When uploading a larger number mp4 videos and jpg and png pictures at once (around 200ish files with 14.7gb in total size) and both got the error. Even some larger files were beeing uploaded without issues, while smaller ones failed.
Form that on I went through my entire php and nextcloud settings, optimizing anything that could have maybe caused problems in wird szenarios. But sadly no change.
Then I went to set up a completely new version of nginx proxy manager because I assumed issues with my old version, that has been running for years now. No change. Then I thought they might have changed parameters in the configurations, but nothing major to find.
Then I experimented with the fork npm-plus because it has a deeper level of settings from the getgo and later even with standard nginx. Same problem.
So from what I have found, proxy_buffering or in general terms chunking is not disabled by default in nginx as you have to explicitly disable it to take effekt.
But behaviour is different for my personal standalone nginx configuration and the nginx proxy manager or npm plus projects.
So I would at least assume that in my personal problem the packages where chunked but I still got an 504 Gateway Timeout. I did play around with timeout configurations and first it seemed to help but not for long.
The weird issue for me was also that I got that 504 timeout long before i reached the for testing reasons set time limit of 1h. My issue came within minutes.
Now I manualy enabled chunking with several different sizes. Also no changes.
The only thing that worked, with and without manually setting chunking,
is setting the “client_max_body_size” to my “upload_max_filesize”. I have no idea why this seems to be the case for me. I even experimented with disabeling hsts to rule out weird session issues.