Skip to content

[GraalJS] Facing High CPU and Memory consumption after upgrading from version 23 to 25 #12741

@manmohantarle

Description

@manmohantarle

Describe the Issue

Hello Team,

I'm using graalvm as a JS engine in camunda 7.24 community edition to execute javascript.

Earlier I was using version 23.0.6 and all my scripts were running properly without excessive cpu or memory consumption

<dependency>
    <groupId>org.graalvm.js</groupId>
    <artifactId>js-scriptengine</artifactId>
    <version>23.0.6</version>
</dependency>

<dependency>
    <groupId>org.graalvm.js</groupId>
    <artifactId>js</artifactId>
    <version>23.0.6</version>
</dependency>

As soon as I upgraded the engine to 25.0.1, I started seeing excessive cpu and memory usage.

<dependency>
    <groupId>org.graalvm.js</groupId>
    <artifactId>js-scriptengine</artifactId>
    <version>25.0.1</version>
</dependency>

<dependency>
    <groupId>org.graalvm.js</groupId>
    <artifactId>js</artifactId>
    <version>25.0.1</version>
    <type>pom</type>
</dependency>

I've not set any explicit graalvm config in application.yml or during runtime except these three flags
Dpolyglot.js.nashorn-compat=true", "-Dpolyglot.engine.WarnInterpreterOnly=false", "-Dpolyglot.js.ecmascript-version=2024

Can someone help me with this issue ?

Using the latest version of GraalVM can resolve many issues.

GraalVM Version

GraalVM Version: 25.0.1

JAVA_VERSION=21

Operating System and Version

Alpine Linux 3.20

Troubleshooting Confirmation

Run Command

I'm using GraalVM as JSR engine in camunda 7.24 community edition

Expected Behavior

Excessive CPU and Memory consumptions should not happen after version upgrade.

Actual Behavior

Excessive CPU and Memory consumptions is happening after version upgrade.

Steps to Reproduce

  1. Upgrade the graalvm dependencies to latest version in camunda 7.24 spring boot starter.
  2. Run javascript nodes in camunda workflows.

Additional Context

No response

Run-Time Log Output and Error Messages

Image Image

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions