OutOfMemory:这个日志文件实际告诉我什么?

时间:2017-06-22 11:58:10

标签: java memory garbage-collection

遇到以下错误: “异常:从线程”Thread-8“中的UncaughtExceptionHandler抛出java.lang.OutOfMemoryError。

以下是生成的日志文件中的GC堆历史记录。 (显然不是完整的日志文件。) 它似乎通过“edan space”表示使用率是100%,但我不确定这个信息是否告诉我。

  • 虚拟机是否空间不足?
  • GC是否无法清理它,或者没有任何东西可以自由清除它 真的用完了内存吗?
  • 将简单地使用命令行参数来增加内存
    解决这个问题?
  • 某处是否有泄漏?

    GC Heap History (10 events):
    Event: 632220.559 GC heap before
    {Heap before GC invocations=11023 (full 616):
     PSYoungGen      total 232960K, used 116736K [0x00000000eab00000, 0x0000000100000000, 0x0000000100000000)
      eden space 116736K, 100% used [0x00000000eab00000,0x00000000f1d00000,0x00000000f1d00000)
      from space 116224K, 0% used [0x00000000f8e80000,0x00000000f8e80000,0x0000000100000000)
      to   space 116224K, 0% used [0x00000000f1d00000,0x00000000f1d00000,0x00000000f8e80000)
     ParOldGen       total 699392K, used 699346K [0x00000000c0000000, 0x00000000eab00000, 0x00000000eab00000)
      object space 699392K, 99% used [0x00000000c0000000,0x00000000eaaf48d8,0x00000000eab00000)
     Metaspace       used 60711K, capacity 65403K, committed 81792K, reserved 1110016K
      class space    used 5955K, capacity 9471K, committed 21888K, reserved 1048576K
    Event: 632220.864 GC heap after
    Heap after GC invocations=11023 (full 616):
     PSYoungGen      total 232960K, used 116734K [0x00000000eab00000, 0x0000000100000000, 0x0000000100000000)
      eden space 116736K, 99% used [0x00000000eab00000,0x00000000f1cffa10,0x00000000f1d00000)
      from space 116224K, 0% used [0x00000000f8e80000,0x00000000f8e80000,0x0000000100000000)
      to   space 116224K, 0% used [0x00000000f1d00000,0x00000000f1d00000,0x00000000f8e80000)
     ParOldGen       total 699392K, used 699346K [0x00000000c0000000, 0x00000000eab00000, 0x00000000eab00000)
      object space 699392K, 99% used [0x00000000c0000000,0x00000000eaaf48d8,0x00000000eab00000)
     Metaspace       used 60711K, capacity 65403K, committed 81792K, reserved 1110016K
      class space    used 5955K, capacity 9471K, committed 21888K, reserved 1048576K
    }
    Event: 632220.866 GC heap before
    {Heap before GC invocations=11024 (full 617):
     PSYoungGen      total 232960K, used 116736K [0x00000000eab00000, 0x0000000100000000, 0x0000000100000000)
      eden space 116736K, 100% used [0x00000000eab00000,0x00000000f1d00000,0x00000000f1d00000)
      from space 116224K, 0% used [0x00000000f8e80000,0x00000000f8e80000,0x0000000100000000)
      to   space 116224K, 0% used [0x00000000f1d00000,0x00000000f1d00000,0x00000000f8e80000)
     ParOldGen       total 699392K, used 699346K [0x00000000c0000000, 0x00000000eab00000, 0x00000000eab00000)
      object space 699392K, 99% used [0x00000000c0000000,0x00000000eaaf48d8,0x00000000eab00000)
     Metaspace       used 60711K, capacity 65403K, committed 81792K, reserved 1110016K
      class space    used 5955K, capacity 9471K, committed 21888K, reserved 1048576K
    Event: 632221.172 GC heap after
    Heap after GC invocations=11024 (full 617):
     PSYoungGen      total 232960K, used 116735K [0x00000000eab00000, 0x0000000100000000, 0x0000000100000000)
      eden space 116736K, 99% used [0x00000000eab00000,0x00000000f1cfff30,0x00000000f1d00000)
      from space 116224K, 0% used [0x00000000f8e80000,0x00000000f8e80000,0x0000000100000000)
      to   space 116224K, 0% used [0x00000000f1d00000,0x00000000f1d00000,0x00000000f8e80000)
     ParOldGen       total 699392K, used 699346K [0x00000000c0000000, 0x00000000eab00000, 0x00000000eab00000)
      object space 699392K, 99% used [0x00000000c0000000,0x00000000eaaf48d8,0x00000000eab00000)
     Metaspace       used 60711K, capacity 65403K, committed 81792K, reserved 1110016K
      class space    used 5955K, capacity 9471K, committed 21888K, reserved 1048576K
    }
    Event: 632221.174 GC heap before
    {Heap before GC invocations=11025 (full 618):
     PSYoungGen      total 232960K, used 116736K [0x00000000eab00000, 0x0000000100000000, 0x0000000100000000)
      eden space 116736K, 100% used [0x00000000eab00000,0x00000000f1d00000,0x00000000f1d00000)
      from space 116224K, 0% used [0x00000000f8e80000,0x00000000f8e80000,0x0000000100000000)
      to   space 116224K, 0% used [0x00000000f1d00000,0x00000000f1d00000,0x00000000f8e80000)
     ParOldGen       total 699392K, used 699346K [0x00000000c0000000, 0x00000000eab00000, 0x00000000eab00000)
      object space 699392K, 99% used [0x00000000c0000000,0x00000000eaaf48d8,0x00000000eab00000)
     Metaspace       used 60711K, capacity 65403K, committed 81792K, reserved 1110016K
      class space    used 5955K, capacity 9471K, committed 21888K, reserved 1048576K
    Event: 632221.483 GC heap after
    Heap after GC invocations=11025 (full 618):
     PSYoungGen      total 232960K, used 116735K [0x00000000eab00000, 0x0000000100000000, 0x0000000100000000)
      eden space 116736K, 99% used [0x00000000eab00000,0x00000000f1cfffc0,0x00000000f1d00000)
      from space 116224K, 0% used [0x00000000f8e80000,0x00000000f8e80000,0x0000000100000000)
      to   space 116224K, 0% used [0x00000000f1d00000,0x00000000f1d00000,0x00000000f8e80000)
     ParOldGen       total 699392K, used 699346K [0x00000000c0000000, 0x00000000eab00000, 0x00000000eab00000)
      object space 699392K, 99% used [0x00000000c0000000,0x00000000eaaf48d8,0x00000000eab00000)
     Metaspace       used 60711K, capacity 65403K, committed 81792K, reserved 1110016K
      class space    used 5955K, capacity 9471K, committed 21888K, reserved 1048576K
    }
    Event: 632221.485 GC heap before
    {Heap before GC invocations=11026 (full 619):
     PSYoungGen      total 232960K, used 116735K [0x00000000eab00000, 0x0000000100000000, 0x0000000100000000)
      eden space 116736K, 99% used [0x00000000eab00000,0x00000000f1cffff8,0x00000000f1d00000)
      from space 116224K, 0% used [0x00000000f8e80000,0x00000000f8e80000,0x0000000100000000)
      to   space 116224K, 0% used [0x00000000f1d00000,0x00000000f1d00000,0x00000000f8e80000)
     ParOldGen       total 699392K, used 699346K [0x00000000c0000000, 0x00000000eab00000, 0x00000000eab00000)
      object space 699392K, 99% used [0x00000000c0000000,0x00000000eaaf48d8,0x00000000eab00000)
     Metaspace       used 60711K, capacity 65403K, committed 81792K, reserved 1110016K
      class space    used 5955K, capacity 9471K, committed 21888K, reserved 1048576K
    Event: 632221.789 GC heap after
    Heap after GC invocations=11026 (full 619):
     PSYoungGen      total 232960K, used 116735K [0x00000000eab00000, 0x0000000100000000, 0x0000000100000000)
      eden space 116736K, 99% used [0x00000000eab00000,0x00000000f1cfffc0,0x00000000f1d00000)
      from space 116224K, 0% used [0x00000000f8e80000,0x00000000f8e80000,0x0000000100000000)
      to   space 116224K, 0% used [0x00000000f1d00000,0x00000000f1d00000,0x00000000f8e80000)
     ParOldGen       total 699392K, used 699346K [0x00000000c0000000, 0x00000000eab00000, 0x00000000eab00000)
      object space 699392K, 99% used [0x00000000c0000000,0x00000000eaaf48d8,0x00000000eab00000)
     Metaspace       used 60711K, capacity 65403K, committed 81792K, reserved 1110016K
      class space    used 5955K, capacity 9471K, committed 21888K, reserved 1048576K
    }
    Event: 632221.790 GC heap before
    {Heap before GC invocations=11027 (full 620):
     PSYoungGen      total 232960K, used 116736K [0x00000000eab00000, 0x0000000100000000, 0x0000000100000000)
      eden space 116736K, 100% used [0x00000000eab00000,0x00000000f1d00000,0x00000000f1d00000)
      from space 116224K, 0% used [0x00000000f8e80000,0x00000000f8e80000,0x0000000100000000)
      to   space 116224K, 0% used [0x00000000f1d00000,0x00000000f1d00000,0x00000000f8e80000)
     ParOldGen       total 699392K, used 699346K [0x00000000c0000000, 0x00000000eab00000, 0x00000000eab00000)
      object space 699392K, 99% used [0x00000000c0000000,0x00000000eaaf48d8,0x00000000eab00000)
     Metaspace       used 60711K, capacity 65403K, committed 81792K, reserved 1110016K
      class space    used 5955K, capacity 9471K, committed 21888K, reserved 1048576K
    Event: 632222.091 GC heap after
    Heap after GC invocations=11027 (full 620):
     PSYoungGen      total 232960K, used 116736K [0x00000000eab00000, 0x0000000100000000, 0x0000000100000000)
      eden space 116736K, 100% used [0x00000000eab00000,0x00000000f1d00000,0x00000000f1d00000)
      from space 116224K, 0% used [0x00000000f8e80000,0x00000000f8e80000,0x0000000100000000)
      to   space 116224K, 0% used [0x00000000f1d00000,0x00000000f1d00000,0x00000000f8e80000)
     ParOldGen       total 699392K, used 699346K [0x00000000c0000000, 0x00000000eab00000, 0x00000000eab00000)
      object space 699392K, 99% used [0x00000000c0000000,0x00000000eaaf48d8,0x00000000eab00000)
     Metaspace       used 60711K, capacity 65403K, committed 81792K, reserved 1110016K
      class space    used 5955K, capacity 9471K, committed 21888K, reserved 1048576K
    }
    

1 个答案:

答案 0 :(得分:0)

  

GC调用后的堆= 11026(完整619):

     

GC调用后的堆= 11027(完整620):    ParOldGen
   对象空间699392K,99%使用

可以从中推断出,在日志结束时,您只能看到完整的GC,并且在 GC之后老一代已经完整。因此,您的应用程序内存不足或泄漏。