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, 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, PDF Automation Server is allocated 2048MB of memory. If your server has enough RAM (6GB or over), you can 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 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 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: