I reopened, forgot that you need to set -PjvmArgs, as I commented before: <<For a 2GB+ file you need to set Xmx to more than the double of the file size, eg: gradlew ofbiz -PjvmArgs="-Xms1024M -Xmx5048M">> This also adds information in security.properties: <<By default (OOTB) OFBiz is protected against Large File Denial of Service>>