3

I have deployed Spring Boot Restful service [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 dependencies. Also connected with MySQL and AutoScalar marketplace services.

This restful service is working excellent with respect to SLA and memory utilisation. However, I have observed following concerns:

  1. The application has been deployed with initial memory however after couple of minutes (say 15-20 minutes), it is keep growing by 2-5MBs every couple-of-minutes. However there is no load (service call).
  2. After a huge work load, the application get reached on certain memory (say 600MB). But the Memory is not coming down after the load (even in idle state for a while ). However due to above point 1, the memory is keep growing.

The JMX is showing that GC is calling both minor and major while work load and following is the Spring Metrics through spring-boot-starter-actuator:

{"_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}
Jeet
  • 5,569
  • 8
  • 43
  • 75
  • For #2, see http://stackoverflow.com/questions/30458195/does-gc-release-back-memory-to-os – racraman Aug 18 '16 at 01:49
  • The formatting of the question could use some improvement to make it easier to read. You somehow have quoted the whole post and then double quoted the two concerns. – Shawn Clark Aug 18 '16 at 01:55
  • If you are trying to investigate memory concerns then I would check out memory analysis tools like [VisualVM](https://visualvm.java.net/) or [Eclipse Memory Analyzer](http://www.eclipse.org/mat/) – Shawn Clark Aug 18 '16 at 02:00
  • This App is deployed on PCF (Pivotal Cloud Foundry) and the issues: "Memory keep increase" and "Memory not releasing" are monitored on PCF App dashboard and same is reflecting through CF CLI. – shobhit sharma Aug 18 '16 at 14:10

0 Answers0