Error with importing gml for Indonesia DHIS 2.33

I once encountered somehow a similar issue regarding the file size uploaded to dhis, I was using Nginx server between me and the dhis instance, and By default, Nginx has a limit of 1MB on file uploads. I needed to increase this limit in the Nginx configuration, using the client_max_body_size directive, This directive can be set in the http , server or location context.

If you have access to the Nginx configuration you can do one of the following:
Set in http block which affects all server blocks ( virtual hosts ).

http {

client_max_body_size 100M ;
}

Or set in location block , which affects a particular directory (dhis) under a site/app.

location /dhis{

client_max_body_size 100M;
}

Save the file and restart Nginx webserver to apply the recent changes using the following command.

systemctl restart nginx
service nginx restart

Once you have saved the changes and restarted the HTTP server, the 413 (Request Entity Too Large) error will be returned only if the size in a request exceeds the New configured value of 100MB.

Also if you are not using Nginx but only Tomcat. In server.xml file you can add maxHttpHeaderSize="65536" to the Tomcat Connector such as:

<Connector port="8080" protocol="HTTP/1.1" redirectPort="8443" maxHttpHeaderSize="65536" />

which increases the size limit same as in Nginx case. anyhow, in summary your problem is related to some size limit that needs to be tweaked in the server.

2 Likes