My Tech-Notes

Increase the limit in dspace.cfg

This guide explains how to increase the file upload limit for DSpace 6.3.


Increase the limit in dspace.cfg

File: [dspace]/config/dspace.cfg

Default:

upload.max = 2097152

This is in bytes (2 MB).

Change for 1 GB:

upload.max = 1073741824

Save the file.


Increase Tomcat’s HTTP POST limit

File: [tomcat]/conf/server.xml

Find the <Connector> tag for your HTTP port (e.g., 8080).

Set unlimited POST size:

<Connector port="8080" protocol="HTTP/1.1"
           connectionTimeout="20000"
           redirectPort="8443"
           maxPostSize="0" />

0 means unlimited. Or set a byte value, e.g., maxPostSize="1073741824" for 1 GB.


Check PostgreSQL max_allowed_packet

PostgreSQL does not have the max_allowed_packet like MySQL. Large bitstreams are stored on the file system, not directly in the database. Ensure there are no other database constraints blocking large object storage.


Restart Tomcat

After changes, restart Tomcat:

sudo systemctl restart tomcat7

(Use tomcat8 or tomcat9 if applicable.)


Optional: Adjust Nginx/Apache (if used as reverse proxy)

For Nginx:

server {
    ...
    client_max_body_size 2G;
    ...
}

For Apache:

<Directory "/path/to/dspace">
    LimitRequestBody 2147483648
</Directory>

Test it