Skip to content

Updating from quarkus 2.9.2.Final (Java 17) to 3.17.2 (Java 21) heap memory issues #45122

@TiagoFerreirahub

Description

@TiagoFerreirahub

Describe the bug

After the following changes:

  • Changing quarkus version from 2.9.2.Final to 3.17.2;
  • Changing dependency "quarkus-resteasy" to "quarkus-rest-jackson"

A rest client that was consuming a ~350MB json response stopped working and now throws java.lang.OutOfMemoryError: Java heap space.

Same heap memory configurations were used:

  • Xms100m
  • Xmx300m

In order for the new quarkus version and dependencies to work i needed to raise the Xmx to 2g.

I was not able to upload all the zip files, but i do have the whole setup for testing done, if needed i can send it.

Expected behavior

Client-works.zip
In version 3.17.2 of quarkus, with the new dependencies and java version, the json body should be able to be consumed with similar heap configurations. (Working client with quarkus version 2.9.2.Final on zip file in attachments)

Actual behavior

After changing the quarkus version to 3.17.2, java to version 21, and changing dependency "quarkus-resteasy" to "quarkus-rest-jackson", it is not possible to consume the same json body response with the same heap memory configurations. (Needed to raise Xmx from 300m to 2g)

How to Reproduce?

  1. Create a quarkus project with version 2.9.2.Final, java 17 and "quarkus-resteasy" and "quarkus-rest-client-jackson" dependencies. (Check zip file "Client-works.zip") and run it with Xms100m and Xmx300m.
  2. Create another quarkus client similar to the previous one but with version 3.17.2, java 21 and with "quarkus-rest" and "quarkus-rest-client-jackson" dependencies and run it with Xms100m and Xmx300m.
  3. Create a mock server that will return a ~350MB json response.
  4. Make a request to the server on one client and the other, the client with quarkus version 2.9.2.Final should be able to read the response and the client with the quarkus version 3.17.2 should take a lot of time to read it and eventually throw java.lang.OutOfMemoryError: Java heap space.

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

  • I ran all the tests on Docker containers with the specified heap configurations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions