Workato · On-prem agent
java.lang.OutOfMemoryError: Java heap space (on-prem agent)
Short answer
This error in the on-prem agent log means the agent does not have enough memory for a large job or payload. Raise the Java heap with the -Xmx option and restart the agent.
VerifiedLast verified
01Error text
java.lang.OutOfMemoryError: Java heap space02Likely causes
- The on-prem agent lacks memory for large jobs or payloads.
- The heap size defaults to a fraction of the available system memory.
03How to fix it
- On Windows, open the Service Wrapper Configuration app for the agent, go to the Java tab and add
-Xmxto the Java Options field, for example-Xmx10Gfor 10 GB. Click Apply. - On Linux, Mac or Docker, add
-XmxtoJAVA_OPTIONSinrun.sh, for exampleJAVA_OPTIONS="${JAVA_OPTIONS:-} -Xmx10G". - Restart the agent.
04Official documentation
→Related errors
- Temporary job dispatch failure"Temporary job dispatch failure" means the job's actions used up the finite memory allocated to the job container. Redesign the recipe to process data in batches and to stream files instead of loading them whole.
- Long query error: Missing files profileThis on-prem error means the On-prem files connection and the database connection in the recipe use different on-prem groups. Set both connections to use agents in the same on-prem group.
Test every fix in a non-production environment before you apply it to production. See how entries are verified.
More for Workato work:Open Workato jobsWorkato rates and salariesHire a senior Workato developer