If your client starts freezing after a period of use, heavily utilizing the CPU and eventually becoming completely unresponsive, you most likely have too little memory allocated for the Java process. This situation typically occurs when generating print reports or performing exports with larger volumes of data.
Identifying the Problem
This step can be skipped. The out-of-memory issue can be verified by launching the client from the command line (terminal), provided that the same memory configuration is used as during a normal startup (see configuration files). The client can be launched from the command line in the following ways:
Windows: C:\Program Files (x86)\WinStrom\spustit-winstrom.bat — before launching, compare the parameters in this file with the parametry.txt file
Linux: in a terminal window, run /usr/bin/flexibee — identical to a normal application startup
MacOS: in a terminal window, run
/Applications/FlexiBee.app/Contents/MacOS/JavaAppLauncher(on older versions of Flexi, the command is/Applications/FlexiBee.app/Contents/MacOS/flexibee-console) — before launching, compare the parameters in this file with the configuration in Info.plist
When a freeze is caused by insufficient memory, the following errors appear in the console:
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: GC overhead limit exceeded
Adjusting Parameters
The parameter values that control the maximum memory size for the application can be changed in the following configuration files:
Windows: C:\Program Files (x86)\WinStrom\parametry.txt, or at the path where you installed Flexi
Linux: /etc/default/flexibee — add the parameter: FLEXIBEE_JAVA_ARGS="${FLEXIBEE_JAVA_ARGS} -Xms1g -Xmx2g"
-Xms= initial heap size
Specifies the initial Java heap size at application startup → the JVM allocates exactly this amount immediately on startup.-Xmx= maximum heap size
Specifies the maximum heap size that the JVM can grow to during application runtime → the JVM will never exceed this value.For stable performance, both values can be set to the same amount.
MacOS: /Applications/FlexiBee.app/Contents/Info.plist — modify the parameter <string>-Xmx1g</string> (in the last array collection)
Java memory settings are in most cases individual, depending on how the Java application is used. If you would like to learn more about how Java manages memory and how to configure its various parameters, you can refer to the following resource.
When making more advanced parameter changes, we recommend monitoring current memory usage and garbage collection activity using this tool.
Recommended Parameter Values
Minimum | Recommended Increase |
Java heap -Xmx1g | -Xmx2000m |
