Latest News

the latest news from our team

Handling memory exceptions in eFORMz

When initially configured, eFORMz does not take all the memory on a server. In most cases the default memory limit is only two GB.

The Java parameters that control memory use are -ms and -mx, sometimes used as -Xmx and -Xms. 

The “-ms” parameter controls the starting memory used. It is the minimum amount of memory eFORMz will use. Java cannot start if this amount is not available.

The “-mx” parameter controls the upper limit Java will use on a system. The memory is not all used at startup. It is taken by Java as more memory is needed and is released to system use when no longer in active use. Java starts even if the value is greater than the amount available.

Most installations of eFORMz work correctly at the default values. As additional threads or high resolution graphics are used, additional memory might need to be allocated through this setting.

The default settings for Windows are:

param00 = -mx2048M
param01 = -ms512M

In heavy use situations:

param00 = -mx8G
param01 = -ms2G

For extreme situations use :

param00 = -mx64G
param01 = -ms6G

[keywords: java.lang.OutOfMemoryError OutOfMemoryError Java heap space]

The Out of Memory error is sometimes the result of a problem that Java cannot resolve. For example, invalid XML files that eFORMz cannot process have been known to result in memory problems as Java attempts to process invalid XML. Setting up Director Alerts can help avoid this problem, but the best approach is to create only valid XML files.

If the eFORMz logs include garbage collection (GC) errors, the operating system is in a confused state and should be restarted. Please also check the following conditions:

  • Available disk space where eFORMz is installed and any volumes to which eFORMz writes files. The solution for this condition, of course, is more disk space.
  • One or more data files that are unusually large. One customer had eFORMz processing files that were typically under 10 KB. One file was 144 MB and it caused numerous issues. One way to fix this issue is to add a file size selector in the configuration file’s file selector. For example, set it to select files that are less than 1 MB.
  • One or more data files that is caught in a loop. The solution for this is a Director Alert, as described above.

Leave a Reply

Your email address will not be published. Required fields are marked *