I am trying to increase the upload content size. Default size is 100MB.
I am trying to change it to 500MB.
I am able to change in the openedx-cms-production-settings using tutor plugin.
I have to update the same in Caddyfile located at the the location “$(tutor config printroot)/env/apps/caddy/Caddyfile” for the following entry studio.lms-dev.techsophy.com{$default_site_port}
I have directly edited the file and changed the value of max_size to 500MB and it is working.
How to I apply this change using tutor plugin? Need some hint
There are several patch hooks in the Caddyfile you can take advantage in a plugin. For instance, caddyfile-cms. I’m no Caddy expert, but I believe you could create a plugin like so, and it would get you what you need:
I don’t think using tutor plugin would work because the request_body.max_size is appended at the bottom of the settings and it will be ignored by the default value.
One workaround way that I can think about is to modify the tutor Caddyfile template at
/home/ubuntu/.local/lib/python3.8/site-packages/tutor/templates/apps/caddy/Caddyfile
but you have to manually set this value everytime you upgrade tutor.
@partha can you please check whether implementing the “caddyfile-cms” and “caddyfile-lms” patches works for you? If not, would they work if the patch was located before the import proxy "lms:8000"/import proxy "cms:8000" statements?
Even after modifying the Caddyfiles as suggested by @regis it did not work. Following are the changes I made.
I have manually edited the Caddyfile at location “$(tutor config printroot)/env/apps/caddy/Caddyfile”
moved the request_body section before import as shown bellow
Sorry it took me so long to get back to you @partha. I propose that we move the “caddyfile-cms” and “caddyfile-lms” patches just before the import proxy line. I believe this should resolve your issue, as you would be able to create a patch that overrides the max_size. Right?