Uploaded image for project: 'OpenJDK'
  1. OpenJDK
  2. OPENJDK-2297

Heap memory errors when using OpenJDK 1.8 (after switching form Oracle JDK)

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • Critical

      To save license costs, the team switched a Java application from Oracle JDK/JRE to OpenJDK 1.8 - 32-bit. We must use 32-bit since the application uses a LANSA Adapter component/DLL arora-lcejni-2.0.dll that needs 32-bit, so we cannot use 64-bit JDK/JRE.

      Following is the JRE version used:

      java-1.8.0-openjdk-1.8-Ø.372

      During testing, initially, the application worked fine. However, we noticed that the application often will not start due to failing to allocate the needed memory initially. We then killed a few background services/applications, and the application started successfully. 

      During load testing, the application will crash and throw memory errors. Again, by tweaking the Java switches for memory allocation parameters (such as -Xmx512m) either by making it lower or higher, we notice improvement, however, eventually, it will start throwing the OutOfMemoryError errors and all transactions will fail.

      Such errors never happened in Oracle JDK/JRE.

      I believe I have provided all the necessary information. Please let me know if you require any additional details.

      See below related information, error logs, and snapshots.

      Server Details:
      Processor: Intel(R) Xeon(R) Platinum CPU @ 2.20GHz 2.19 GHz (16 processors)
      Installed memory (RAM): 64.0 GB
      System type: 64-bit Operating System, x64-based processor
      Pen and Touch: Pen and Touch Support with 10 Touch Points
      
      Following is the command line output when starting the application and it fails sometimes. If we kill some background applications, it works:
      Picked up _JAVA_OPTIONS: -Xms64m -Xmx1024m
      openJDK Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
      Error occurred during initialization of VM
      Could not reserve enough space for 1048576KB object heap
      The following is the log after running the application for sometime during a load test using the JVM parameter -Xmx512m, and then it will start throwing the following errors:
      2023.09.25,11:20:35.667,ACTaskHelper,handleTaskExecuteException,Fidelity Information Services Pooled Thread 2,,,,Task 'CustomTask' failed 
      2023.09.25,11:20:36.908,SCBProcessSolaceJMSOutbound,checkNewMessages,Fidelity Information Services Pooled Thread 0,,,,Closing DB Connection 
      2023.09.25,11:20:36.908,ACTaskHelper,handleTaskExecuteException,Fidelity Information Services Pooled Thread 2,,,,com.karora.ac.task.ACTaskExecuteException: An Application error has occurred.  Please contact your system administrator.; nested exception is: 
                  java.lang.OutOfMemoryError: Java heap space
                  Nested Exception: java.lang.OutOfMemoryError: Java heap space
      java.lang.OutOfMemoryError: Java heap space
      

      Following is the memory utilization from Windows Task Manager about the time when the process started throwing errors when using the JVM parameter -Xmx512m:

       

      The following error is thrown during the application startup when using OpenJDK 64-bit:
      java.lang.UnsatisfiedLinkError: karora-lcejni-2.0.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform

              rh-eaguilar Ezequiel Aguilar
              tarekahf Tarek Faham (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: