Request entity is too large error on database upload

I was testing how to remove and subsequently reinstall the grampsweb docker app on a Debian 12 virtual machine running on my Ubuntu 22.04.4 desktop.

I used the docker-compose down --rmi all -v --remove-orphans command to purge the app and the created volumes, then restarted the virtual machine.

I ran docker-compose up -d using the same docker-compose.yml and config.cfg that had been originally used to create the original grampsweb app. The application was created but when I attempted to upload the same .gramps database file that had been previously used I get an error: “Request Entity Too Large” and the file is not imported.

Has anyone else experienced this and how did you fix the issue?

Gramps 5.2.2
Gramps Web API 2.3.0
Gramps Web Frontend 24.5.0
Gramps QL 0.3.0
locale: en
multi-tree: false
task queue: true

Please provide details about your setup and report the error shown in the logs (if any) and the browser developer console.

Hello David,

Thanks for the quick reply. I was looking over the logs in the grampsweb docker project and also used the browser console to look for issues but found none!! I created another Debian 12 virtual machine on my desktop, installed docker and docker compose and then brought up the application using the docker-compose.yml and config.cfg files that I had successfully used the first time around. The gramps xml file uploaded and installed perfectly on this virtual machine. I went back to the original machine, purged all docker containers and volumes, and uninstalled and reinstalled docker and docker compose. The grampsweb app came up with no issues, but when I selected the tree file I received the same error message. I did a google search and found that the error that I was seeing (Request entity is too large) was a typical one for nginx if the file size exceeds the default (1M) and I was encountering this problem because the app on my virtual machine is accessed through an nginx reverse proxy. After adding the directive “client_max_body_size 2M” to nginx.conf and restarting nginx, the selected file uploaded perfectly.

Thanks again.

1 Like