Jenkins java process running a docker container consuming 8core cpu

Hi

There is a jenkins running in a docker container and that java process is consuming the most cpu (nearly 8 core) of the rhel server.
This is causing the build to fail and console seems very slow (inaccessible).

Any suggestions to improve this.