Skip to content
Advertisement

Tag: out-of-memory

Container Fails to Start: Insufficient memory for the Java Runtime Environment to continue

We have an enterprise application running on Java 8. The deployment environment is built & updated through Bitbucket pipelines. I have a graphic showing the high-level architecture of the environment. We have two app servers running identical configurations apart from some application specific environment variables. It was all working well until a week ago when after a successful pipeline run,

How can we simulate OutOfMemory: Metaspace?

I have a task to simulate OutOfMemory: Metaspace error intentionally. I tried different ways, but none gave me needed result. Can someone share good example for this purpose? My first attempt (using javassist): and settings in gradle.properties file: org.gradle.jvmargs=-XX:MaxMetaspaceSize=70M but I’ve got an error: Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “main” which I couldn’t catch. My second attempt:

Jasper report exporting to text results in java.lang.OutOfMemoryError: Java heap space

Currently I am using jasper v 3.7.4 While exporting to any other format (csv,xls,pdf) from the same dataset – I have has no issues. Exporting to text throws: java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:3236) at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118) Here is my code: I am also using a virtualizer as jasperPrint parameter But it does not help, and also the following warning is

Using Spring data JPA EntityGraph with LAZY load mode for NamedAttributeNode field

I am facing with 2 problems: N + 1 query and Out Of Memory (OOM). I solved OOM by paging and lazy loading: But when I use lazy loading, N + 1 query happened. So I try to use EntityGraph as https://www.baeldung.com/spring-data-jpa-named-entity-graphs. But as my researches and local test, EntityGraph always do eager loading for NamedAttributeNode field – association field,

Why does Java throw java.lang.OutOfMemoryError: Metaspace but there is plenty of free metaspace?

In my application I’m creating lots of java classes at runtime with javassist library. At some point a java.lang.OutOfMemoryError: Metaspace is thrown but java process monitoring (based on java.lang.management.MemoryPoolMXBean) reports that there is plenty of free metaspace. Why is that? And how to use 100% of metaspace memory pool? I’ve created a minimal application that reproduces the problem https://github.com/vlkv/java_metaspace_oom Donwload

Increase the java heap space of a certain app

I have an application that I want to run it and gives it more heap memory. I run my application using this command in terminal: home/bin/hadoop jar $pathofjarfile parameter1 parameter2 but I don’t know how to allocate more heap memory when running this application? if anyone could please advise. Answer The easiest method to increase the heap space is using

Android: OutOfMemory error and the backstack

the following sheet represents the working flow in the application this question is about. I ran into problems with OutOfMemory Errors, mostly because users were able to switch from activity B to activity D multiple times (They are showing different content for every attempt), without the previous activity being destroyed. This led into a very large backstack resulting in an

Advertisement