Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java ThreadPoolExecutor stops working after a while

I have a problem with the ThreadPoolExecutor. It works fine for hours, but sometimes (at a random time, sometimes after 2 minutes or 3 hours) it stops executing the submitted tasks and the program hangs.

The queue is full and all corethreads are active at this time.

I simply don't know where this is coming from. Especially because it sometimes works for 3 hours while all corethreads are working all the time.

If there is anybody who has a suggestion for me, I would be very happy.

like image 371
Bene Avatar asked Dec 14 '25 01:12

Bene


1 Answers

Take a look at the stack dump. This will tell you if the threads are in some blocking operation, waiting for a condition that never happens, working, or truly deadlocked.

like image 98
erickson Avatar answered Dec 15 '25 16:12

erickson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!