Skip to content

OutOfMemoryError: unable to create new native thread #786

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
KevinLiu707 opened this issue Apr 30, 2025 · 0 comments
Open

OutOfMemoryError: unable to create new native thread #786

KevinLiu707 opened this issue Apr 30, 2025 · 0 comments
Labels

Comments

@KevinLiu707
Copy link

KevinLiu707 commented Apr 30, 2025

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?

@KevinLiu707 KevinLiu707 changed the title OutOfMemoryError: unable toc reate new native thread OutOfMemoryError: unable to create new native thread May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant