Spring Boot和Java java.lang.OutOfMemoryError:超出了GC开销限制

我的VPS有问题。我有一台使用Spring Boot和Java创建的服务器。最初,我将-Xms默认设置为-Xmx4G。在客户端上多次致电后,出现此错误:

**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