Spring Boot Restful服务,增加内存,无负载

时间:2016-08-18 01:39:53

标签: rest memory-leaks spring-boot pivotal-cloud-foundry

我已经部署了Spring Boot Restful服务[spring-boot-starter-parent -

1.3.0.RELEASE] along with: - 
spring-boot-starter-cloud-connectors,
spring-boot-starter-data-rest, 
spring-boot-starter-jdbc, 
spring-boot-starter-test, 
spring-boot-configuration-processor, 
spring-context-support[4.1.2.RELEASE] and 
spring-cloud-starter-parent[Brixton.M4] 

maven依赖项。还与MySQL和AutoScalar市场服务相关联。

这项宁静的服务在SLA和内存利用率方面表现出色。但是,我观察到以下问题:

  1. 应用程序已经部署了初始内存但是之后 几分钟(比如15-20分钟),它会继续增长2-5MB 每隔几分钟。但是没有负载(服务电话)。
  2. 在大量工作负载之后,应用程序在某些内存(例如600MB)上达到。但是在负载之后内存没有下降 (即使在闲置状态一段时间)。但是由于上述第1点, 记忆力不断增长。
  3. JMX显示GC在工作负载时调用次要和主要,并且通过spring-boot-starter-actuator执行Spring Metrics:

    {"_links" : {"self" : {"href" : "https://Promotion/metrics"}},"mem" :     
    376320,"mem.free" : 199048,"processors" : 4,"instance.uptime" :
    6457682,"uptime" : 6464241,"systemload.average" : 0.05,"heap.committed" 
    : 376320,"heap.init" : 382976,"heap.used" : 177271,"heap" : 
    376320,"threads.peak" : 22,"threads.daemon" : 20,"threads.totalStarted" 
    : 27,"threads" : 22,"classes" : 9916,"classes.loaded" : 
    9916,"classes.unloaded" : 0,"gc.ps_scavenge.count" : 
    47,"gc.ps_scavenge.time" : 344,"gc.ps_marksweep.count" : 
    0,"gc.ps_marksweep.time" : 0,"httpsessions.max" : 
    -1,"httpsessions.active" : 0,"datasource.primary.active" : 
    0,"datasource.primary.usage" : 0.0,"gauge.response.metrics" : 
    7.0,"gauge.response.BuyMoreSaveMore.getDiscDetails" : 
    14.0,"counter.status.200.metrics" : 
    7,"counter.status.200.BuyMoreSaveMore.getDiscDetails" : 850}
    

0 个答案:

没有答案