This can be caused by a lot of reasons. Maybe you have an infinite loop in your code, maybe you handle too many objects at once,…
First of all, you need to identify which part of your code caused the issue. There are tools that can help you with that.
You should investigate your code what could create of java processes.
- Are you using the process queue? Maybe you have configured a lot of queues which are using a lot of threads at the same time and are very busy.
- Do you have a lot of schedules events which are running at the same time?
- Have you some actions which create background processes?
- Do you have a high frequently used webservice provided?