socket.io-client-java icon indicating copy to clipboard operation
socket.io-client-java copied to clipboard

OutOfMemoryError: unable to create new native thread

Open KevinLiu707 opened this issue 8 months ago • 0 comments

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 avatar Apr 30 '25 03:04 KevinLiu707