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:

  1. Stop PDF Automation Server
  2. 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)
  3. Change -Xmx2048m with -Xmx4096m to increase the allocation from 2048MB to 4096MB, for instance
  4. Save the file
  5. Restart PDF Automation Server

On Linux / Unix:

  1. Stop PDF Automation Server
  2. 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.
  3. Change -Xmx2048m with -Xmx4096m to increase the allocation from 2048MB to 4096MB, for instance
  4. Save the file
  5. Restart PDF Automation Server

On Mac:

  1. Stop PDF Automation Server
  2. Open Finder
  3. Go to Applications
  4. Right Click or CTRL + Click on the PDF Automation Server Application icon and select “Show Package Contents” in the menu
  5. Click on Contents
  6. Double-Click on Info.plist to open the file
  7. Change -Xmx2048m with -Xmx4096m to increase the allocation to 4096MB, for instance
  8. Save the file
  9. Restart PDF Automation Server
Tagged: