WIP: fix: ensure large uploads work #84

Draft
p4u1 wants to merge 2 commits from upload-limit into main
Owner

TODO:

  • move version to 9
  • add a variable in the .env to set memRequestBodyBytes
TODO: - [ ] move version to 9 - [x] add a variable in the .env to set `memRequestBodyBytes`
Owner

@p4u1 is this ready for testing? we're having this same issue

@p4u1 is this ready for testing? we're having this same issue
Owner

we tested it anyway! this is what we observe, taking into account we're reverse-proxying coopcloud's traefik with an nginx server (with really high client body size and timeout limits):

  • PHP_UPLOAD_LIMIT=20G
  • with a 3GB file, the web client creates 5 chunks and starts 5 PUT requests
  • the first request fails with 504 gateway timeout error
  • web client cancels the other 4 with 499 client closed connection
  • abra logs 400 errors for the 5 requests on recipe's nginx
  • no php logs (i've never seen a php-fpm log that worked btw)
we tested it anyway! this is what we observe, taking into account we're reverse-proxying coopcloud's traefik with an nginx server (with really high client body size and timeout limits): * `PHP_UPLOAD_LIMIT=20G` * with a 3GB file, the web client creates 5 chunks and starts 5 PUT requests * the first request fails with 504 gateway timeout error * web client cancels the other 4 with 499 client closed connection * abra logs 400 errors for the 5 requests on recipe's nginx * no php logs (i've never seen a php-fpm log that worked btw)
Author
Owner

@fauno for me this worked for a 4gb upload. But I also needed the traefik fix coop-cloud/traefik#107

I don't really have time right now to bring both PRS over the finish line so feel free to continue

@fauno for me this worked for a 4gb upload. But I also needed the traefik fix https://git.coopcloud.tech/coop-cloud/traefik/pulls/107 I don't really have time right now to bring both PRS over the finish line so feel free to continue
Owner

i'm reading traefik's docs and apparently the maxRequestBodyBytes option is already 0 by default, but memRequestBodyBytes is set at 1MB, should we increase this?

i'm reading traefik's docs and apparently the maxRequestBodyBytes option is already 0 by default, but [memRequestBodyBytes](https://doc.traefik.io/traefik/reference/routing-configuration/http/middlewares/buffering/#opt-memRequestBodyBytes) is set at 1MB, should we increase this?
Owner

@fauno does this work now and should this be merged?

@p4u1 why have version NGINX_CONF_VERSION=v8b instead of NGINX_CONF_VERSION=v9?

@fauno does this work now and should this be merged? @p4u1 why have version `NGINX_CONF_VERSION=v8b` instead of `NGINX_CONF_VERSION=v9`?
Owner

@ineiti i think it's good as it is, yeah, and we need it for other deployments that'll be too complex for deploying from a branch, so it'd be good if it's released soon

@ineiti i think it's good as it is, yeah, and we need it for other deployments that'll be too complex for deploying from a branch, so it'd be good if it's released soon
Owner

Great - I'm happy to release, but as a new maintainer I would like to understand the following parts first, to make sure nothing else breaks:

  • why the version is 8a instead of 9
  • the maxRequestBodyBytes can be removed, correct?
  • should we add a variable in the .env to set memRequestBodyBytes? @fauno do you need it?
Great - I'm happy to release, but as a new maintainer I would like to understand the following parts first, to make sure nothing else breaks: - why the version is `8a` instead of `9` - the `maxRequestBodyBytes` can be removed, correct? - should we add a variable in the .env to set `memRequestBodyBytes`? @fauno do you need it?
Owner
  • i think what @p4u1 tried to do with the nginx version was to wait until merge to increase it to 9
  • it'd be best to leave an explicit maxRequestBodyBytes since it may change in the future
  • yeah, i think memRequestBodyBytes should be bigger, the default is too low
  • mmm default env vars do work in my experience 🤔
* i think what @p4u1 tried to do with the nginx version was to wait until merge to increase it to 9 * it'd be best to leave an explicit `maxRequestBodyBytes` since it may change in the future * yeah, i think `memRequestBodyBytes` should be bigger, the [default is too low](https://doc.traefik.io/traefik/reference/routing-configuration/http/middlewares/buffering/#opt-memRequestBodyBytes) * mmm default env vars do work in my experience 🤔
ineiti force-pushed upload-limit from 394b68a920 to bc209de28e 2026-07-22 14:39:57 +00:00 Compare
Author
Owner

Hey, I am afk until next Werk so feel free to Marke any edits here.

@p4u1 why have version NGINX_CONF_VERSION=v8b instead of NGINX_CONF_VERSION=v9?

I usually do this while testing my changes. Theetter should be removed

Hey, I am afk until next Werk so feel free to Marke any edits here. > [@p4u1](https://git.coopcloud.tech/p4u1) why have version NGINX_CONF_VERSION=v8b instead of NGINX_CONF_VERSION=v9? I usually do this while testing my changes. Theetter should be removed
Owner

@p4u1 why have version NGINX_CONF_VERSION=v8b instead of NGINX_CONF_VERSION=v9?

I usually do this while testing my changes. Theetter should be removed

Just for me to understand: the merge in coop-cloud/traefik#107 which still contains the letter - is this a mishap, or do you expect it to be fixed on the next tagged release?

I'm trying to find out all the best practices :)

> > [@p4u1](https://git.coopcloud.tech/p4u1) why have version NGINX_CONF_VERSION=v8b instead of NGINX_CONF_VERSION=v9? > > I usually do this while testing my changes. Theetter should be removed Just for me to understand: the merge in [coop-cloud/traefik#107](https://git.coopcloud.tech/coop-cloud/traefik/pulls/107) which still contains the letter - is this a mishap, or do you expect it to be fixed on the next tagged release? I'm trying to find out all the best practices :)
Owner
  • i think what @p4u1 tried to do with the nginx version was to wait until merge to increase it to 9
  • it'd be best to leave an explicit maxRequestBodyBytes since it may change in the future
  • yeah, i think memRequestBodyBytes should be bigger, the default is too low

What is a reasonable size then? Currently it's 1MiB, should we go to 16MiB?

  • mmm default env vars do work in my experience 🤔

Yes, did some digging and saw it works - but I corrected my comment while you replied :) I had other problems with those variables, IIRC related to ansible, and got confused...

> * i think what @p4u1 tried to do with the nginx version was to wait until merge to increase it to 9 > * it'd be best to leave an explicit `maxRequestBodyBytes` since it may change in the future > * yeah, i think `memRequestBodyBytes` should be bigger, the [default is too low](https://doc.traefik.io/traefik/reference/routing-configuration/http/middlewares/buffering/#opt-memRequestBodyBytes) What is a reasonable size then? Currently it's 1MiB, should we go to 16MiB? > * mmm default env vars do work in my experience 🤔 Yes, did some digging and saw it works - but I corrected my comment while you replied :) I had other problems with those variables, IIRC related to ansible, and got confused...
Author
Owner

@p4u1 why have version NGINX_CONF_VERSION=v8b instead of NGINX_CONF_VERSION=v9?

I usually do this while testing my changes. Theetter should be removed

Just for me to understand: the merge in coop-cloud/traefik#107 which still contains the letter - is this a mishap, or do you expect it to be fixed on the next tagged release?

I'm trying to find out all the best practices :)

Yes this was a misshap

> > > [@p4u1](https://git.coopcloud.tech/p4u1) why have version NGINX_CONF_VERSION=v8b instead of NGINX_CONF_VERSION=v9? > > > > I usually do this while testing my changes. Theetter should be removed > > Just for me to understand: the merge in [coop-cloud/traefik#107](https://git.coopcloud.tech/coop-cloud/traefik/pulls/107) which still contains the letter - is this a mishap, or do you expect it to be fixed on the next tagged release? > > I'm trying to find out all the best practices :) Yes this was a misshap
Owner

Added a TODO in the first message - I'll concentrate on merging the new versions of the containers and let whoever needs this take care of the TODO.

Added a TODO in the first message - I'll concentrate on merging the new versions of the containers and let whoever needs this take care of the TODO.
ineiti added 2 commits 2026-07-25 20:14:06 +00:00
ineiti force-pushed upload-limit from bc209de28e to bb8f0e342f 2026-07-25 20:14:06 +00:00 Compare
Owner

@fauno @p4u1 I added a variable for the memRequestBodyBytes - can you please check if it works? I rebased it on the latest version, so I think it's best if first you do a abra app upgrade for the nextcloud, and then test this branch here.

Or how do you usually work with your own branch? Just check it out and then use --chaos?

@fauno @p4u1 I added a variable for the `memRequestBodyBytes` - can you please check if it works? I rebased it on the latest version, so I think it's best if first you do a `abra app upgrade` for the nextcloud, and then test this branch here. Or how do you usually work with your own branch? Just check it out and then use `--chaos`?
fauno reviewed 2026-07-25 21:55:24 +00:00
@@ -25,6 +25,7 @@ EXTRA_VOLUME=/dev/null:/tmp/.dummy
PHP_MEMORY_LIMIT=1G
PHP_UPLOAD_LIMIT=512M
MEM_REQUEST_BODY_SIZE=$(( 1048576 * 16 ))
Owner

is this evaluated?

is this evaluated?
Owner

Or how do you usually work with your own branch? Just check it out and then use --chaos?

yes, is there another way? :P

> Or how do you usually work with your own branch? Just check it out and then use --chaos? yes, is there another way? :P
Owner

yes, is there another way? :P

It's the only official way I know, so I was curious if there is a smarter way to do so :)

I'm using my special abra from here: https://git.coopcloud.tech/ineiti/abra, which allows to have a

RECIPE=https://git.coopcloud.tech/c4dt/nextcloud

in your service.domain.env file. So you can have the same recipe from the original and from the special path. And it also works if you have all your servers/* files in a git on more than one computer.

But it's still a bit buggy, and LLM-vibe coded, so use at your own risk :)

> yes, is there another way? :P It's the only official way I know, so I was curious if there is a smarter way to do so :) I'm using my special abra from here: https://git.coopcloud.tech/ineiti/abra, which allows to have a ``` RECIPE=https://git.coopcloud.tech/c4dt/nextcloud ``` in your `service.domain.env` file. So you can have the same recipe from the original and from the special path. And it also works if you have all your `servers/*` files in a git on more than one computer. But it's still a bit buggy, and LLM-vibe coded, so use at your own risk :)
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin upload-limit:upload-limit
git checkout upload-limit
Sign in to join this conversation.
No Reviewers
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coop-cloud/nextcloud#84