node-java icon indicating copy to clipboard operation
node-java copied to clipboard

Thread pool issue

Open dustinth opened this issue 8 years ago • 4 comments

I use node-java heavily in my project, I found that if I run more than 4 long running async call to java method, other call will be blocked until previous task finished. I try to increase UV_THREADPOOL_SIZE but it seems not working.

dustinth avatar Apr 02 '16 05:04 dustinth

I meet this question, too. Whatever the UV_THREADPOOL_SIZE i have setted, the jvm handler threads num is always 4.

13661172102 avatar Apr 13 '20 12:04 13661172102

image

13661172102 avatar Apr 13 '20 12:04 13661172102

@dustinth or @13661172102 or anyone around: I am not finding this issue applicable any more - at least based on my testing:

  • Using Node 18 - when I increased thread pool size to 25, Calling JAVA code with 25 to 100 concurrent tests, all threads CPU time incremented uniformly.

I don't see JVM somehow limit itself to only 4 threads, even though actual thread pool size is more and there are more concurrent requests submitted. Based on node thread CPU time - it seems all threads are utilized by JVM.

Can someone please confirm my findings OR confirm that this issue is no longer valid with recent versions - may be very older versions had this behavior? Any insight is appreciated

JTBS avatar Dec 15 '23 21:12 JTBS

您好,我是陆泽,邮寄已收到,谢谢

13661172102 avatar Dec 15 '23 21:12 13661172102