entity too large when uploading data to xnat

44 views
Skip to first unread message

Roman Belenya

unread,
Mar 27, 2026, 2:27:13 PMMar 27
to xnat_discussion
Hi all,

I'm having trouble uploading data to xnat using compressed image uploader and the file manager. In both cases there's a error 413:

Error 413: error

Issue uploading your data:

413 Request Entity Too Large
nginx/1.28.0


I'm running the latest version using xnat-docker-compose and I've recently upgraded from xnat 1.8.6.1
XNAT_VERSION=1.9.3.3
PG_VERSION=16.9-alpine
NGINX_VERSION=1.29.0-alpine-perl


I've checked online and on this forum and the error points to nginx configuration line "client_max_body_size". However, this line is already there in nginx.conf, so it seems this is not because of nginx configuration. I also tried to enter the line under the http and server configuration, but that didn't help. There's unfortunately also no other errors/messages in the log files to give me any idea what's wrong.

Would anyone have any clues what to look for to try and resolve this? Thank you!

This is the current server configuration in the nginx.conf file (no change from xnat-docker-compose master branch):
 server {
   listen 80;
   location / {
       proxy_pass                          http://xnat-web:8080;
       proxy_redirect                      http://xnat-web:8080 $scheme://localhost;
       proxy_set_header Host               $host;
       proxy_set_header X-Real-IP          $remote_addr;
       proxy_set_header X-Forwarded-Host   $host;
       proxy_set_header X-Forwarded-Server $host;
       proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
       proxy_connect_timeout               150;
       proxy_send_timeout                  100;
       proxy_read_timeout                  100;
       proxy_buffers                       4 32k;
       client_max_body_size                0;
       client_body_buffer_size             128k;
   }

Best,
Roman

Roman Belenya

unread,
Apr 1, 2026, 1:02:09 PMApr 1
to xnat_discussion
Update: we are running xnat on a server that's accessible through Wireguard vpn. Our system administrator has opened port 80 and configured the server so that we can access xnat app with a public url and don't have to connect to wireguard to access xnat.

Now when I enter in the siteConfig, siteUrl our server's wireguard ip address and connect to xnat with vpn on, uploading works fine. However, with public url in the siteUrl we get error  413. 

Here's an example summary:

- siteUrl: 10.0.5.1
- Wireguard on
--> Uploading works

- Wireguard off
--> Uploading gives error 413

Would this be something related to server configuration rather than xnat? I'd appreciate very much any ideas so I could forward it to our system admin!

Best,
Roman

Timothy Olsen

unread,
Apr 1, 2026, 2:08:22 PMApr 1
to xnat_di...@googlegroups.com
Yes.  The fact that uploading directly via another connection method shows that it's not the server, but the connection method that is the issue.  It looks like something outside of XNAT is applying that limit.
Tim

Timothy R Olsen 

Founder, President




--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/xnat_discussion/9c3f3f2e-f4d4-4e66-8bfb-38c2adb9a6d8n%40googlegroups.com.

Roman Belenya

unread,
Apr 2, 2026, 4:56:54 PMApr 2
to xnat_discussion
Thank you, Tim!

Best,
Roman
Reply all
Reply to author
Forward
0 new messages