We have recently migrated a springboot application to 2.7.11 version, and while performing a load test, a nasty error raised :
"Unhandled exception 'java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
we noticed that the app now consumes a bit more memory than lhe last version, so i tried to collect some profiling infos through visualvm, and i noticed that a forkjoinpool (a custom thread pool with parallelism is set to 5) is creating many thread than expected (300 thread instead of 5):

Roughly speaking, the app parse a big json file and cuts it into several pieces, and foreach part we send a task to the forkjoinpool through executor.execute().
Noting that we are serving this application on openshift V4, and we've never got this weird error when using springboot 2.6.6.
If your tasks take a long time to execute, there's a risk that ForkJoinPool could create additional threads to maintain a degree of parallelism.