How to correct "java.lang.OutOfMemoryError" errors
Posted by , Last modified by Aly Essa on 24 July 2018 11:10 AM

Overview

If you are seeing "Error transferring [filename]: class java.lang.OutOfMemoryError" errors in your logs, you will need to increase the memory (RAM) assigned to Java on your FileCatalyst Server,  FileCatalyst HotFolder, And/Or FileCatalyst Central installations. 

All FileCatalyst applications require an Oracle Java x64 bit installations. To allocate a large heap size (1536 MB) a x64 bit installation is required. You can not allocate more than 4096 MB when using x64 bit architecture.
 More information can be found on Oracles FAQs

Environment

FileCatalyst HotFolder v3.0 and later.
FileCatalyst Server v3.0 and later.
FileCatalyst Central v3.0 and later.

Oracle Java 7 and later. 

Note: FileCatalyst Direct Suite v3.7.2 requires Java 8.

Resolution

Click on the links below to view the individual guide based on your FileCatalyst Application:


How To Increase memory in FileCatalyst Server and FileCatalyst HotFolder

  1. Depending on your Operating System the configuration files to change memory and Java properties vary. These are found in the installation directories of FileCatalyst Direct and FileCatalyst HotFolder respectively:

    • Windows Installation Location:

      • FileCatalyst Server: <path to>\FileCatalyst Server\fcconf.conf
      • FileCatalyst HotFolder: <path to>\FileCatalyst HotFolder\fchf.conf

    • Linux Installation Location:

      The memory and settings on FileCatalyst installations on Linux platforms are found in the wrapper.conf file:

      • FileCatalyst Server: /opt/utechsoft/server/conf/wrapper.conf
      • FileCatalyst HotFolder: /opt/utechsoft/hotfolder/conf/wrapper.conf

    • Mac OSX Installation Location:

      Please ignore steps 2-4 for MAC installations.
      The configuration files that control the Java properties vary based on the type of installation performed on the MAC. In most cases these applications are "Running as a Service".

      • FileCatalyst Server:
        • MAC OSX configurations are managed by an Info.plist file residing inside the FileCatalystServer.app package which tells the system the parameters needed to start the application.
        • To access the Info.plist, select the FileCatalystServer.app icon and right-click.
        • Select Show Package Contents.
        • Edit the info.plist with a text editor.
        • To increase the memory used edit the following line using a higher value for the -Xmx parameter:

          <string>-Xms64M</string>
          <string>-Xmx4096M</string>

          Note the example above uses 4 GB of RAM. Verify that your system can use this value.

        • Save the file and close the editor.

      • FileCatalyst HotFolder:
        • Running Stand Alone - MAC OSX configurations are managed by an Info.plist file residing inside the FileCatalystHotFolder.app package which tells the system the parameters needed to start the application.
        • To access the Info.plist, select the FileCatalystHotFolder.app icon and right-click.
        • Select Show Package Contents.
        • Edit the info.plist with a text editor.
        • To increase the memory used edit the following line using a higher value for the -Xmx parameter:

          <string>-Xms64M</string>
          <string>-Xmx4096M</string>

          Note the example above uses 4 GB of RAM. Verify that your system can use this value.

        • Save the file and close the editor.

  2. Look for the following parameters in the file(s) above:

    # Initial Java Heap Size (in MB)

    wrapper.java.initmemory=1024

    # Maximum Java Heap Size (in MB)

    wrapper.java.maxmemory=1024

    Initial Java Heap Size will allocate a base amount of memory to the application and will increase usage to the Maximum Java Heap Size. Please consult Oracles FAQs for maximum heap size values for 32-bit and 64-bit systems.

  3. Change the wrapper.java.maxmemory= to a higher value than you have now but you can not exceed 4096 MB and your value should be less than what the system has available. Try 2048 MB as a starting point and you can increase this value to 3072 MB or 4096 MB as needed. If you choose 2048 MB your Maximum Heap Size would look like:

    # Maximum Java Heap Size (in MB)

    wrapper.java.maxmemory=2048

  4. Once you have made and saved these changes in the .conf file(s), restart the service(s) and see if your out of memory errors stop. If not, try a higher wrapper.java.maxmemory= value and repeat the above.

How To Increase memory in FileCatalyst Central
  1. Depending on your installation type and Operating System the configuration file and path will vary. Please use the following list for the FileCatalyst Central installations:
     
    Installation Locations:
     
    • Windows: <path to>\FileCatalyst Central\mawrapper.conf

    • Linux: /opt/utechsoft/central/conf/wrapper.conf

    • Mac OSX:

      Please ignore steps 2-4 for MAC OSX and perform the following steps:
      • Stand Alone:  MacOSX configurations are managed by an Info.plist file residing inside the FileCatalystCentral.app package which tells the system the parameters needed to start the application. 
      • To access the Info.plist, select the FileCatalystCentral.app icon and right-click.
      • Select Show Package Contents.
      • Edit the Info.plist with a text editor.
      • To increase the memory used edit the following line using a higher value for the -Xmx parameter:

        <string>-Xms64M</string>
        <string>-Xmx4096M</string>

        Note the example above uses 4 GB of RAM. Verify that your system can use this value.

      • Save the file and close the editor.

  2. Look for the following parameters in the file(s) above:

    # Initial Java Heap Size (in MB)
    wrapper.java.initmemory=1024

    # Maximum Java Heap Size (in MB)

    wrapper.java.maxmemory=1024

    Initial Java Heap Size will allocate a base amount of memory to the application and will increase usage to the Maximum Java Heap Size. Please consult Oracles FAQs for maximum heap size values for 32-bit and 64-bit systems.


  3. Change the wrapper.java.maxmemory= to a higher value than you have now but you can not exceed 4096 MB and your value should be less than what the system has available. Try 2048 MB as a starting point and you can increase this value to 3072 MB or 4096 MB as needed. If you choose 2048 MB your Maximum Heap Size would look like:

    # Maximum Java Heap Size (in MB)

    wrapper.java.maxmemory=2048

  4. Once you have made and saved these changes in the .conf file(s), restart the service(s) and see if your out of memory errors stop. If not, try a higher wrapper.java.maxmemory= value and repeat the above.

Note:

For more details regarding the memory allocation for Workflow and Webmail, see the following Knowledgebase Article: 

How to Configure Memory Allocated to FileCatalyst Workflow and Webmail