Q: I sometimes get a “java heap space” error when running PDF Automation Server. What does this mean?
A: When running intense processes in PDF Automation Server or dealing with very large files, you may get a “java heap space” exception. This happens when PDF Automation Server is running out of memory. Note that the server is pretty resilient and usually recovers from this kind of errors.
By default, memory for PDF Automation Server is allocated according to the following schedule:
- For 64bit installers, memory allocated is 25% of the available system memory with a minimum of 2GB and maximum of 8GB
System Memory PAS Allocated Memory <=3GB 1024m 4GB 1536m 6GB 2048m 8GB 2560m 10GB 3072m 14GB 3584m 16GB 4096m 24GB 6144m >=32GB 8192m
- For 32bit installers and Unix installer with no JRE, default memory allocated is set to 1024m
If you are not running other applications on the server, you could allocate more memory by following the steps below.
Make sure you have enough memory available or your machine will start swapping memory and be unresponsive.
How to increase memory in PDF Automation Server
On Windows:
- Stop PDF Automation Server
- Open the file called QoppaPAS.vmoptions located in PDF Automation Server installation directory: C:\Program Files\QoppaPAS (Some Windows versions will require you to start Notepad as an administrator and open the file from there to be able to save it)
- Change -Xmx2048m with -Xmx4096m to increase the allocation from 2048MB to 4096MB, for instance
- Save the file
- Restart PDF Automation Server
On Linux / Unix:
- Stop PDF Automation Server
- Open the file called QoppaPAS.vmoptions located in PDF Automation Server installation directory. If this file does not exist, create an empty file with this name.
- Change -Xmx2048m with -Xmx4096m to increase the allocation from 2048MB to 4096MB, for instance
- Save the file
- Restart PDF Automation Server
On Mac:
- Stop PDF Automation Server
- Open Finder
- Go to Applications
- Right Click or CTRL + Click on the PDF Automation Server Application icon and select “Show Package Contents” in the menu
- Click on Contents
- Double-Click on Info.plist to open the file
- Change -Xmx2048m with -Xmx4096m to increase the allocation to 4096MB, for instance
- Save the file
- Restart PDF Automation Server