Skip to content

[BUG]In the Windows development environment, after running for a period of time, the CPU reaches 100% #1447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
H-Dynamite opened this issue Feb 19, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@H-Dynamite
Copy link

What is the bug?

A clear and concise description of the bug.

I have been experiencing an issue where, after running my application for some time, the CPU usage spikes to 100%. This problem has been persistent and is quite frustrating. I suspect it might be related to JDK NIO polling, but I haven't been able to pinpoint the exact cause.

How can one reproduce the bug?

Steps to reproduce the behavior.

pom.xml

    <dependency>
      <groupId>org.opensearch.client</groupId>
      <artifactId>opensearch-java</artifactId>
      <version>2.21.0</version>
    </dependency>

    <dependency>
      <groupId>org.apache.httpcomponents.client5</groupId>
      <artifactId>httpclient5</artifactId>
      <version>5.4.2</version>
    </dependency>

Image

    public static void main(String[] args) throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException, IOException, InterruptedException {
        var client = SampleClient.create();
        var version = client.info().version();
        System.out.println("version = " + version);
        while (true){
            Thread.sleep(5000);
        }
    }

What is your host/environment?

Operating system, version.

Environment:

Development Environment: IntelliJ IDEA

Operating System: Windows 11 CPU 13th Gen Intel(R) Core(TM) i7-13700,2100 Mhz 32GRAM

JDK: Amazon Corretto 11.0.21

This is the result of using IDEA performance analysis

Image

Image

@H-Dynamite H-Dynamite added bug Something isn't working untriaged labels Feb 19, 2025
@Xtansia Xtansia removed the untriaged label Feb 19, 2025
@Xtansia
Copy link
Collaborator

Xtansia commented Feb 19, 2025

This appears to be completely independent of the OpenSearch client itself and directly related to Apache HTTP Client, I'd recommend using one of the mechanisms here to either ask questions or report the issue to the Apache HTTP Client team directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants