My application gives a StackOverflowError because the SegmentWorker tries to assign segments but it fails. In the logs I get: There is No Worker Launcher active, and the TrackingSegmentWroker does a lot of .run en .cleanUp
The issue is likely because the same thread is switching between being a worker and a work launcher, likely because there are no available threads. To remedy you can increase the maxThreadCount of the processor. It might also be looping between worker and work launcher because there is a persistent problem that might be somewhere else in the logging.
I don’t think it is the problem of the maxThreadCount, because the application was running smoothly for weeks except for a couple of hours when the StackOverflowError occured. It might indeed be a problem of the database.
If it’s been running for weeks, then that might be the problem. Each time it switches roles, it’s an additional item on the stack. So likely having more threads does solve the problem, as it will create a new thread instead.