Skip to end of metadata
Go to start of metadata

Z-JAVA-105 - Java exception java.lang.OutOfMemoryError

Before we are able to make an exact diagnosis of the problem, we would require to know the following:

  • Are you receiving this error message from the JobScheduler application itself or from one of the jobs being run by JobScheduler?
  • Can you provide a scheduler.log file in which we can see where the error occurs?
  • How does JobScheduler behave after this error occurs?

Problem Java heap space

We are getting the following error message:

Unfortunately we have not been able change the value with "-Xmx" as we have not been able to localise the part of the application in which the memory overflow occurs.

Solution Java heap space

However, there are two situations where it is possible that you can avoid this error by increasing the heap space yourself:

  • If your problem is occurring in a job, you can use the java_options attribute to increase the heap space at the job level. It would, however, be interesting for us to know whether this error occurs with one of the jobs the SOS GmbH has provided or whether it occurs with a custom job?

Problem unable to create new native thread

We are getting the following error message:

This error can occur if an api job in a job chain gets orders without a break.
Then the task of the job never ends and throws above error after an unspecified number of orders.
This is a very special situation. Until the corresponding ticket is unresolved you can use the following workaround.

Workaround unable to create new native thread

Copy the file force_new_task.js from to the folder where the api job is stored and configure the job with the following monitor-script and a parameter "max_num_of_orders_per_task":

This script ends the current task after the max. number of orders which is set in the above parameter.
The next order creates a new task.