If you are working with a large project with extensive metadata or key references, you may need to increase the amount of memory that is allocated to the Java process that performs the publishing.
-Xmx2g. If you do not specify the -Xmx value in this field, by
default, the application will use a maximum of 512 megabytes when used with a 32-bit
Java Virtual Machine and one gigabyte with a 64-bit Java Virtual Machine.ANT_OPTS environment variable from a command line for a specific
session.set ANT_OPTS=%ANT_OPTS% -Xmx1024Mexport ANT_OPTS="$ANT_OPTS -Xmx1024M"ANT_OPTS environment
variable on your system.baseJVMArgLine parameter to the DITA-OT command line. For
example:-DbaseJVMArgLine=-Xmx2048m