This will tell the JVM to produce a heap dump when a OOM occurs: Start the application with the VM argument -XX:+HeapDumpOnOutOfMemoryError. Follow those steps to find the root cause of the OOM: Step 1. The root cause can be very hard to find in development if the problem cannot be reproduced. To solve that issue, you first need to find the root cause of it. However, it suddenly throws a OOM after several days in production at customer site. For instance, the application might behave flawlessly during development and QA. At this point, the JVM will throw an OOM ( OutOfMemoryError).Ī memory leak can be very latent. The garbage collector cannot collect those objects and the application will eventually run out of memory. A memory leak happens when the application creates more and more objects and never releases them. In many cases, like in the case of a memory leak, that second option is the only good solution. Improve or fix the application to reduce memory usage
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |