Skip to content

ClassGraph raised OOM error in my project #2050

@hantsy

Description

@hantsy

My project is based on Spring Boot 3/R2dbc + Kotlin/KotlinCoroutines + Java 17(set Language Level to 17). I am using the latest 2.0.2 in my project.

The source codes archived 100k lines now.

In the newest feature branch, I always encountered an OutOfMemoery error when running tests on Github Actions, even I used a custom larger runner with 4 core + 16G and increased the Gralde jvm args to use a larger heap size(4G, 8G, 12G) to build the project. It is 100% failed due to the OOM error.

There is a question I posted on StackOverFlow, https://stackoverflow.com/questions/75169922/outofmemoryerror-in-gradle-springboot-kotlin-coroutines-project

Today I tried to remove Spring Doc config, and spring-doc dep, it works. And the build progress is shorten to 75%, and saved 2 min.

I am not sure why if ClassGraph is a must for springdoc, Spring itself scan all beans at runtime. Why we need another scanner in the background and finally kill the application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions