[Tutor 16.1.4] uwsgi-config template patch doesn't seem to be applying overwritten values


My org is using LTI content from a vendor and they seem to have increased their UWSGI header size recently beyond the default limit of 8192 that tutor has in config

I see that there is already a template patch that we can use to amend values like the buffer-size in the uwsgi.ini file, so I went ahead and created a new uwsgi-config patch in our plugins patch directory with the following in it:

buffer-size = 16384

Upon running tutor config save I do see that the updated buffer-size was appended to $(tutor config printroot)/env/apps/openedx/uwsgi.ini (and I assume the second buffer-size key pair will just take precedence over the first)

static-map = /static=/openedx/staticfiles/
static-map = /media=/openedx/media/
http =
buffer-size = 8192
wsgi-file = $(SERVICE_VARIANT)/wsgi.py
processes = $(UWSGI_WORKERS)
thunder-lock = true
single-interpreter = true
enable-threads = true
buffer-size = 16384

But I also see that the patch is not appending this overwritten value to the uwsgi.ini file in $(tutor config printroot)/env/build/openedx/settings/uwsgi.ini and as such does not seem to be actually injected into the container images on build.

Am I misunderstanding what this template patch is supposed to be doing or are we using it incorrectly? I wasn’t able to find any discussion about this patch really so any insight would be great.


The patch in tutor/templates/apps/openedx/uwsgi.ini is bindmounted to the container at runtime. The file that is built into the image (tutor/templates/build/openedx/settings/uwsgi.ini) serves as a good set of default values and to keep the ability to run the image even without the bindmount.

I don’t think you will be able to ship an openedx image with modified values for uwsgi.ini. You will need to include a plugin with the necessary changes on each tutor installation that needs them.

The uwsgi overrides in our uwsgi-config patch didn’t seem to actually be making their way onto the running containers after running tutor config save, nothing that the change had been added to the ini file in apps, and restarting services.

Am I missing a step?

That seems really weird. Your changes are being reflected on the $(tutor config printroot)/env/apps/openedx/uwsgi.ini file right? Does your $(tutor config printroot)/env/local/docker-compose.yml includes the bindmounts to the uwsgi.ini file? What does the docker inspect` returns when inspecting the lms container?