Skip to content

OutOfMemoryError: unable to create new native thread #786

Open
@KevinLiu707

Description

@KevinLiu707

In our project, there is a large number of OOM issues @nkzawa @darrachequesne . relate oom issue

Image

and the errors all point to the EventThread class.
The root cause is that the single-thread pool in the EventThread class closes every time after completing a task, and a new thread pool needs to be created again when executing tasks next time.

Image

Is this code reasonable? It seems that the purpose of the thread pool has been lost, as threads are not being reused and are instead being constantly recreated, leading to the OOM problem.
Is there any special logic here? What issues might arise if we remove the logic that closes the thread pool?

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