0

My java app is running out of memory and takes 40 minutes until CF shows the status crash.

2019-09-13T16:11:56.72+0200 [RTR/3] OUT 2019-09-13T16:12:47.13+0200 [APP/PROC/WEB/0] ERR Resource exhaustion event: the JVM was unable to allocate memory from the heap. 2019-09-13T16:12:47.13+0200 [APP/PROC/WEB/0] ERR ResourceExhausted! (1/0) 2019-09-13T16:13:13.69+0200 [APP/PROC/WEB/0] OUT | Instance Count | Total Bytes | Class Name | 2019-09-13T16:13:13.71+0200 [APP/PROC/WEB/0] OUT | 13758 | 1210704 | Ljava/lang/reflect/Method; |

two minutes later there is still no reaction - CF apps manager does not show any issues with this application

application is no longer responding....

2019-09-13T16:49:07.93+0200 [HEALTH/0] ERR Failed to make TCP connection to port 8080: timed out after 1.00 seconds 2019-09-13T16:49:07.93+0200 [CELL/0] OUT Container became unhealthy

but about 34 minutes after the heap dump, cf reports about an unhealthy container... hm - that is a looong time.

Ency79
  • 1
  • 1
  • 2
  • I guess The application working together with spring boot. When there is `OutOfMemoryError ` in application, JVM kill agent run and then JVM kill agent generates `ResourceExhausted`. [OutOfMemoryError](https://stackoverflow.com/questions/37335/how-to-deal-with-java-lang-outofmemoryerror-java-heap-space-error) – Turac Sep 16 '19 at 11:57
  • means just scale the app and that´s all? – Ency79 Sep 16 '19 at 12:43
  • This means not just scale. Because You may have made a mistake in the code.OutOfMemoryError has many of potantial sources. Example make excessive use of `finalizers`, memory leak(unclosed resources or streams, heavy use of static variables, Improper equals() and hashCode() ...) etc. – Turac Sep 16 '19 at 13:07

0 Answers0