jenkins内存泄漏

qaxu7uf2  于 2021-06-30  发布在  Java
关注(0)|答案(0)|浏览(315)

我有一个jesnkins服务器,我必须每周重新启动它,因为它会增加很多重量,只有重新启动才能帮助减轻重量。昨天,我安装了supportcore插件,并生成了一个主堆直方图来检查什么东西变得如此沉重(仅前30个(按#字节排序)

num     #instances         #bytes  class name
-------------------------------------------------------
   1:       3848560      262599088  [B (java.base@11.0.1)
   2:        494858      103280768  [I (java.base@11.0.1)
   3:       2584844       62036256  java.lang.String (java.base@11.0.1)
   4:        157507       45826608  [C (java.base@11.0.1)
   5:        684481       41221360  [Ljava.lang.Object; (java.base@11.0.1)
   6:        976586       31250752  java.util.HashMap$Node (java.base@11.0.1)
   7:        123244       30585456  [J (java.base@11.0.1)
   8:        493351       27627656  java.util.LinkedHashMap (java.base@11.0.1)
   9:        182176       16853376  [Ljava.util.HashMap$Node; (java.base@11.0.1)
  10:        110001       16792080  [S (java.base@11.0.1)
  11:        134009       15009008  net.bull.javamelody.internal.model.CounterRequest
  12:        251974       14054008  [Ljava.lang.String; (java.base@11.0.1)
  13:        368318       11786176  java.lang.StringBuffer (java.base@11.0.1)
  14:        444222       10661328  com.thoughtworks.xstream.mapper.AnnotationMapper$UnprocessedTypesSet
  15:        265811       10632440  java.util.TreeMap$Entry (java.base@11.0.1)
  16:        208416       10003968  java.util.HashMap (java.base@11.0.1)
  17:        187835        9016080  java.lang.StackTraceElement (java.base@11.0.1)
  18:        276934        6646416  com.thoughtworks.xstream.core.util.FastField
  19:          3468        5991696  [F (java.base@11.0.1)
  20:         79871        5750712  java.util.regex.Matcher (java.base@11.0.1)
  21:        233513        5604312  java.lang.StringBuilder (java.base@11.0.1)
  22:         63446        5583248  java.lang.reflect.Method (java.base@11.0.1)
  23:        169524        5424768  java.util.concurrent.ConcurrentHashMap$Node (java.base@11.0.1)
  24:        112296        5220584  [Z (java.base@11.0.1)
  25:        118341        4733640  java.util.LinkedHashMap$Entry (java.base@11.0.1)
  26:        146209        3509016  java.util.ArrayList (java.base@11.0.1)
  27:          4847        3461080  [D (java.base@11.0.1)
  28:        103590        3314880  java.io.ObjectStreamClass$WeakClassKey (java.base@11.0.1)
  29:        163470        2615520  hudson.ExpressionFactory2$JellyJexlContext
  30:        163470        2615520  hudson.ExpressionFactory2$JellyMap

今天再次运行(仅前30个按字节排序):

num     #instances         #bytes  class name
-------------------------------------------------------
   1:        917378      122085992  [B (java.base@11.0.1)
   2:        707231       16973544  java.lang.String (java.base@11.0.1)
   3:        217642       10446816  java.lang.StackTraceElement (java.base@11.0.1)
   4:         52682        9972120  [I (java.base@11.0.1)
   5:        223415        8936600  java.util.TreeMap$Entry (java.base@11.0.1)
   6:        258798        8281536  java.util.HashMap$Node (java.base@11.0.1)
   7:        119488        6925288  [Ljava.lang.Object; (java.base@11.0.1)
   8:         53554        4973248  [Ljava.util.HashMap$Node; (java.base@11.0.1)
   9:         53833        4737304  java.lang.reflect.Method (java.base@11.0.1)
  10:        119504        3824128  java.util.concurrent.ConcurrentHashMap$Node (java.base@11.0.1)
  11:         30089        3369968  net.bull.javamelody.internal.model.CounterRequest
  12:         27040        3053072  [J (java.base@11.0.1)
  13:          3814        3045256  [C (java.base@11.0.1)
  14:         20852        2477384  java.lang.Class (java.base@11.0.1)
  15:         56792        2271680  java.util.LinkedHashMap$Entry (java.base@11.0.1)
  16:         64869        2075808  com.codahale.metrics.WeightedSnapshot$WeightedSample
  17:         36525        2045400  java.util.LinkedHashMap (java.base@11.0.1)
  18:         77482        1859568  java.util.concurrent.ConcurrentSkipListMap$Node (java.base@11.0.1)
  19:         74585        1790040  java.util.LinkedList$Node (java.base@11.0.1)
  20:         72474        1739376  java.util.ArrayList (java.base@11.0.1)
  21:          4501        1692376  java.lang.Thread (java.base@11.0.1)
  22:         33868        1625664  java.util.HashMap (java.base@11.0.1)
  23:         99319        1589104  java.lang.Object (java.base@11.0.1)
  24:         65384        1569216  java.lang.Double (java.base@11.0.1)
  25:         31828        1376928  [Ljava.lang.String; (java.base@11.0.1)
  26:         53144        1275456  java.util.concurrent.atomic.AtomicLong (java.base@11.0.1)
  27:         39555        1265760  java.util.Hashtable$Entry (java.base@11.0.1)
  28:          1508        1175040  [Ljava.util.concurrent.ConcurrentHashMap$Node; (java.base@11.0.1)
  29:         33640        1076480  java.lang.ref.ReferenceQueue (java.base@11.0.1)
  30:         15436         987904  java.net.URL (java.base@11.0.1)

Jenkins·弗尔。2.176.3
我想不出是什么问题。有什么想法吗?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题