关于spring boot + spring cloud 的为服务项目,运行一段时间会报Java heap space

嗯哼嗯啊 发布于 2019/05/30 09:58
阅读 6K+
收藏 2

最开始是调大jvm但是还是会发生;

错误日志:

java.util.concurrent.TimeoutException: null
    at java.util.concurrent.FutureTask.get(FutureTask.java:205)
    at com.netflix.discovery.TimedSupervisorTask.run(TimedSupervisorTask.java:63)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
2019-05-30 09:27:58.186 ERROR 11 --- [DiscoveryClient-0] c.n.discovery.TimedSupervisorTask : task supervisor timed out
java.util.concurrent.TimeoutException: null
    at java.util.concurrent.FutureTask.get(FutureTask.java:205)
    at com.netflix.discovery.TimedSupervisorTask.run(TimedSupervisorTask.java:63)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
2019-05-30 09:28:45.463 ERROR 11 --- [DiscoveryClient-1] c.n.discovery.TimedSupervisorTask : task supervisor timed out
java.util.concurrent.TimeoutException: null
    at java.util.concurrent.FutureTask.get(FutureTask.java:205)
    at com.netflix.discovery.TimedSupervisorTask.run(TimedSupervisorTask.java:63)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
2019-05-30 09:28:57.256 INFO  11 --- [AsyncResolver-bootstrap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
2019-05-30 09:28:59.374 ERROR 11 --- [DiscoveryClient-CacheRefreshExecutor-0] c.netflix.discovery.DiscoveryClient : DiscoveryClient_VANGO-PSO-V1/vango-pso:0:34160dc458f7f1e10d5f90cf01c23047 - was unable to refresh its cache! status = Java heap space
java.lang.OutOfMemoryError: Java heap space

加载中
0
gaomq
gaomq

oom了,内存耗完了。在Jvm启动加个printgc看下是什么耗尽的,暂时启动的时候把内存调大点

像这种  java -Xms2g -Xmx4g -jar

嗯哼嗯啊
嗯哼嗯啊
我之前调了,到时调到你这么大,我试一下我试一下你说的。感谢你得回复
0
java大神起床啦
java大神起床啦

你在用计划任务的  时候  执行完了  没有关闭线程(没有放回线程池中)?

0
GreysonYee
GreysonYee

-XX:+HeapDumpOnOutOfMemoryError

在内存溢出的时候保存内存的快照。然后去分析看看是什么导致的oom。

0
destiny_8
destiny_8

楼主,请问你这个问题最终怎么解决的呢

destiny_8
destiny_8
回复 @java大神起床啦 : 我也是报这个错,但是没有说的任务计划。
java大神起床啦
java大神起床啦
他在跑计划任务 资源没有释放。。
0
阿斯兰
阿斯兰

一年了,我也遇到了

OSCHINA
登录后可查看更多优质内容
返回顶部
顶部