I have a problem on my VPS. I have a server created with Spring Boot and Java. Initially I have set -Xms default and -Xmx4G. After a lot of call on client this errore appears:
**Exception in thread "https-jsse-nio-80-exec-1743" java.lang.OutOfMemoryError: GC overhead
limit exceeded at java.util.Arrays.copyOfRange(Unknown Source)
    at java.lang.String.<init>(Unknown Source)
        at java.lang.String.substring(Unknown Source)
        at org.apache.tomcat.util.net.AbstractEndpoint.getSSLHostConfig(AbstractEndpoint.java:355)
        at .**
After I have used JMeter and open JMC, I have created 2000 thread of request and I can see that the server works; on the JMC the Heap Space is cleaned by GC, but in the Task Manager the memory of Java is increased and I think the problem is that when the RAM of my VPS increases more. So when tha RAM of my VPS is saturated, Java throws the GC Exception. Can you help me? enter image description here