Tagged articles
OutOfMemoryError
55 articles · Page 1 of 1
The article examines a production OutOfMemoryError caused by MyBatis SQL construction, explains heap and metaspace exhaustion, analyzes MyBatis source code, reproduces the issue with JVM settings, and offers practical recommendations to prevent similar memory failures.
BackendHeapJava
0 likes · 7 min read

This article explains how improper use of ThreadLocal in Java can lead to memory leaks and OutOfMemoryError, outlines common scenarios that trigger OOM, and provides best‑practice solutions such as proper removal and alternative ThreadLocal types.
JavaMemoryLeakOutOfMemoryError
0 likes · 4 min read

Upgrading Spring Boot's RestTemplate to the NIO‑based WebClient improves concurrency and performance, but can trigger a java.lang.OutOfMemoryError: Direct buffer memory; this article explains the cause, diagnostic steps using yCrash, and how adjusting -XX:MaxDirectMemorySize resolves the issue.
Java NIOOutOfMemoryErrorRestTemplate
0 likes · 10 min read

This article explains what Java native memory is, outlines the JVM's native memory regions, describes the symptoms of native memory leaks, and provides step‑by‑step methods—including Native Memory Tracking and OutOfMemoryError analysis—to identify and resolve leaks effectively.
JVMJavaNMT
0 likes · 12 min read

This article explains ThreadLocal’s internal mechanism, why improper use can cause OutOfMemoryError in thread pools, demonstrates the issue with a Java example, and provides best‑practice guidance—especially calling remove()—to prevent memory leaks while preparing for interview questions.
ConcurrencyJavaMemory Leak
0 likes · 11 min read

This article explains why collection‑level OutOfMemoryError occurs in Java services, presents two core solutions—code‑level pagination using Stream and database queries, plus hardware upgrades and cloud server scaling—to prevent heap overflow and improve backend performance.
BackendDatabasePaginationJava
0 likes · 9 min read

This article explains why the JVM throws java.lang.OutOfMemoryError: GC overhead limit exceeded, outlines common causes such as traffic spikes, memory leaks, insufficient heap and inefficient GC, and provides practical solutions and debugging steps to diagnose and fix the issue.
GCJVMJava
0 likes · 4 min read

When a production Java service repeatedly restarts and triggers full GC and OutOfMemoryError alerts, this guide shows how to capture heap dumps using JVM flags, install and configure Eclipse Memory Analyzer (MAT), and systematically analyze the dump to pinpoint memory leaks, high usage, and problematic code.
Heap DumpJavaMemory Analyzer
0 likes · 6 min read

java.lang.OutOfMemoryError: Requested array size exceeds VM limit occurs when a Java program attempts to allocate an array larger than the JVM's available heap, and can be mitigated by increasing heap size, optimizing code, or processing data in smaller batches.
JVMJavaOutOfMemoryError
0 likes · 2 min read

This article explains why the java.lang.OutOfMemoryError: Kill process (java) or sacrifice child occurs, outlines system‑level memory‑shortage causes, and provides practical steps to prevent, fix, and troubleshoot the issue on Linux‑based Java applications.
JavaLinuxOOM killer
0 likes · 5 min read

java.lang.OutOfMemoryError: Metaspace occurs when the JVM's native Metaspace exceeds its configured limit, often due to excessive dynamic class generation, large numbers of loaded classes or classloader leaks, and can be mitigated by increasing Metaspace size, fixing memory leaks, and optimizing class loading.
JVMJavaOutOfMemoryError
0 likes · 5 min read

This article explains the Java memory pool model, common Out‑of‑Memory errors, their root causes, tuning parameters, and real‑world case studies to help developers diagnose and resolve OOM issues in containerized Java applications.
JVMJavaOutOfMemoryError
0 likes · 13 min read

This article explains the Java memory model, outlines common OutOfMemoryError types, and provides a step‑by‑step guide for diagnosing, fixing, and preventing memory‑related issues in large‑scale Java applications, including heap, metaspace, and stack analysis, JVM flag tuning, and best‑practice recommendations for resource handling and monitoring.
JVMJavaOutOfMemoryError
0 likes · 8 min read

This article investigates whether the JVM terminates when a thread encounters an OutOfMemoryError, demonstrating through Spring Boot controllers and multithreaded examples how main and child threads, daemon settings, and explicit OOM handling affect JVM shutdown behavior.
JVMJavaOutOfMemoryError
0 likes · 6 min read

This article explains why, in containerized Java applications, the JVM flag -XX:+ExitOnOutOfMemoryError is generally preferred over -XX:+HeapDumpOnOutOfMemoryError, detailing the trade‑offs, operational benefits, and how Kubernetes probes and monitoring can ensure fast failure, rapid recovery, and user‑transparent service continuity.
JVMJavaKubernetes
0 likes · 11 min read

This article explains the various forms of Java OutOfMemoryError, their underlying causes such as heap exhaustion, GC overhead, metaspace limits, and native allocation failures, and provides practical solutions and code snippets to diagnose and resolve each scenario.
Heap DumpJVMMemory Leak
0 likes · 9 min read

This article explains Java heap memory concepts, garbage collection, common memory issues like leaks and OutOfMemoryError, and outlines the team's quality assurance framework—including left‑shift code review, right‑shift monitoring, and continuous delivery practices—to help prevent and resolve production alerts.
JavaOutOfMemoryErrorgarbage collection
0 likes · 10 min read

This article explains six typical OutOfMemoryError situations in Java—heap, native thread, stack overflow, direct buffer, GC overhead, and Metaspace—provides code examples that trigger each issue, shows the resulting exception messages, and offers practical tips such as using thread pools, limiting recursion depth, adjusting GC settings, and configuring Metaspace to avoid these memory problems.
GCHeapJVM
0 likes · 9 min read

This article explores six typical OutOfMemoryError situations in Java—including heap, stack, direct memory, GC overhead, and metaspace issues—explains their root causes, provides reproducible code examples, and offers practical tips to avoid or mitigate each problem.
JVMJavaOutOfMemoryError
0 likes · 8 min read

The article explains the root causes of frequent OutOfMemoryError in a Java backend service, analyzes how MyBatis’s SQL building can exhaust heap memory, demonstrates a reproducible test case, and offers practical recommendations to prevent and resolve such memory leaks.
JavaMemory LeakMyBatis
0 likes · 6 min read

The article investigates frequent OutOfMemoryError incidents in a distributed Java service, explains heap and metaspace causes, analyzes MyBatis source that retains large SQL strings in memory, reproduces the issue with heavy IN clauses and limited heap, and offers practical mitigation advice.
BackendJavaMyBatis
0 likes · 6 min read

This article examines the causes of Java OutOfMemoryError in a distributed backend service, analyzes MyBatis-related memory leaks, demonstrates a reproducible scenario with large SQL concatenations and multithreading, and offers practical mitigation strategies to prevent heap and metaspace overflow.
BackendJavaMemory Leak
0 likes · 6 min read

This article explains the common Java OutOfMemoryError types—including heap space, GC overhead limit exceeded, Metaspace, CodeCache, Direct Memory, and Linux OOM Killer—detailing their causes, symptoms, and step‑by‑step troubleshooting techniques for backend developers.
DirectMemoryGCJVM
0 likes · 11 min read

This article explains the various Java OutOfMemoryError types—including Java heap space, GC overhead limit exceeded, Metaspace, CodeCache, Direct Memory, and Linux OOM Killer—describes their causes, typical symptoms, and provides step‑by‑step troubleshooting and mitigation strategies for developers.
GCJVMJava
0 likes · 10 min read

This article explains what Java OutOfMemoryError (OOM) is, outlines the most common OOM types such as Java heap space, GC overhead limit, Metaspace, and native thread exhaustion, provides sample code for each, and suggests basic mitigation strategies like adjusting JVM options or optimizing code.
JVMJavaOutOfMemoryError
0 likes · 10 min read

An OutOfMemoryError does not always terminate the JVM; the JVM exits only when all non‑daemon threads have finished or the operating system kills the process, so proper exception handling and thread management are essential to keep the application alive.
Exception HandlingJVMJava
0 likes · 3 min read

A production outage at Company A was traced to an incorrect JVM -Xmn setting that matched -Xmx, causing the young generation to consume the entire heap and repeatedly trigger Full GC and OutOfMemoryError, a lesson on careful JVM tuning and script management.
JVMJavaOutOfMemoryError
0 likes · 10 min read

This article investigates the root causes of frequent OutOfMemoryError incidents in a distributed Java backend, explains how MyBatis and DruidDataSource can exhaust heap and metaspace, demonstrates a reproducible test with JVM options and multithreading, and offers practical mitigation strategies.
DockerJavaMemoryLeak
0 likes · 7 min read

The article recounts a production OutOfMemoryError incident caused by heap and metaspace exhaustion in a Java service, analyzes Mybatis's role in the memory leak, reproduces the issue with heavy SQL and multithreading, and offers concrete debugging and code‑optimization steps to prevent future crashes.
HeapMemoryJavaOutOfMemoryError
0 likes · 6 min read

This article reviews the Java HotSpot memory model, explains when JVM tuning is needed, details common OutOfMemoryError scenarios with reproducible code, introduces built‑in monitoring utilities and third‑party tools, and provides practical tuning parameters and case studies for optimizing Java applications.
JVMJavaMonitoring Tools
0 likes · 24 min read

An online service experienced severe latency due to massive GAP times, leading to repeated OutOfMemoryErrors; by analyzing monitoring data, JVM dumps, and SQL queries, the team uncovered a massive userId array causing a 1 GB count query, then implemented request limits and JVM flags to prevent recurrence.
BackendJVMJava
0 likes · 8 min read

This article details a comprehensive investigation of a Java backend service suffering from severe OutOfMemoryError due to an unbounded userId list in a count query, describing monitoring findings, heap dump analysis, and practical mitigation steps including request limiting and JVM tuning.
JVMJavaOutOfMemoryError
0 likes · 7 min read

A seemingly harmless RPC framework bug caused a 4 GB byte array allocation, leading to repeated OutOfMemoryErrors in service B after service A’s deployment, and the article walks through the diagnosis, root‑cause analysis, and a simple fix.
BackendJavaMemory Leak
0 likes · 7 min read

This article introduces a comprehensive solution for diagnosing and attributing Java Out‑Of‑Memory (OOM) issues in Android apps by capturing Hprof memory snapshots, automatically analyzing heap data, identifying leaks, large objects, and class‑wide memory consumption, and providing privacy‑preserving, automated reporting and remediation workflows.
AndroidHprofJava
0 likes · 24 min read

This article explains the four locations where java.lang.OutOfMemoryError can occur in Hadoop's MapReduce framework—client, ApplicationMaster, Map, and Reduce phases—and provides configuration adjustments and best‑practice solutions to mitigate each type of OOM issue.
HadoopJavaMapReduce
0 likes · 11 min read

This article examines the various causes of Java OutOfMemoryError, demonstrating heap overflow, stack overflow, metaspace exhaustion, and direct memory exhaustion through practical code examples, and explains how to diagnose and differentiate memory leaks from genuine memory overuse using JVM tools.
DirectMemoryHeapJVM
0 likes · 14 min read

This article explains the purpose of learning the JVM memory layout, describes each runtime data area—including program counter, VM stack, native method stack, heap, and method area—highlights thread‑private versus shared regions, and provides code samples that trigger StackOverflowError and OutOfMemoryError across different JDK versions.
JVMJavaOutOfMemoryError
0 likes · 17 min read


JavaEdgeJul 2, 2021 · Backend Development
This article explains the various types of Java OutOfMemoryError, shows how to trigger each one on HotSpot JVM, provides diagnostic steps and relevant JVM flags, and offers practical code examples for heap, stack, metaspace, and direct memory overflow scenarios.
DirectMemoryJVMJava
0 likes · 16 min read

This article analyzes a Meituan interview question about whether other threads can continue when one thread throws a Java OutOfMemoryError, explains different OOM types, provides a sample program that triggers heap OOM, and demonstrates that remaining threads keep running while memory is reclaimed.
MultithreadingOutOfMemoryErrormemory-management
0 likes · 5 min read

This article details a step‑by‑step investigation of a Java OutOfMemoryError caused by the Zipkin reporter in a Spring Cloud application, covering symptom identification, resource monitoring, heap dump analysis, code inspection, and the final fix of upgrading the zipkin‑reporter dependency.
BackendJavaOutOfMemoryError
0 likes · 11 min read

This article explores how a Java ThreadPoolExecutor behaves when a task triggers an OutOfMemoryError, demonstrates custom exception handling, compares the four built‑in rejection policies, and shows how to create a custom thread pool that records task execution time.
ConcurrencyCustomThreadPoolOutOfMemoryError
0 likes · 8 min read

The article explains that when a Java thread encounters a heap OutOfMemoryError, the thread terminates but its allocated heap memory is reclaimed, allowing the remaining threads in the same process to continue operating, and demonstrates this with a multithreaded example.
JVMJavaMultithreading
0 likes · 5 min read

This article explains the causes of various Java OutOfMemoryError scenarios—including heap, stack, metaspace, and direct memory overflow—provides diagnostic tools, shows reproducible code examples, and offers practical solutions such as adjusting JVM parameters and optimizing code to prevent memory exhaustion.
HeapJVMJava
0 likes · 17 min read

This article explains the typical sources of Java OutOfMemoryError—including static collections, unclosed connections, improper variable scopes, inner‑class references, hash value changes, cache misuse, and lingering listeners—and provides code examples and solutions to prevent memory leaks.
JavaOutOfMemoryErrorWeakHashMap
0 likes · 10 min read


JavaEdgeDec 21, 2020 · Backend Development
The article explains how Java's Executors utility creates thread pools that can unintentionally exhaust memory, detailing why FixedThreadPool with an unbounded queue and CachedThreadPool with unlimited threads often lead to OutOfMemoryError, and provides code examples and analysis from Alibaba's Java Development Handbook.
ExecutorsJavaOutOfMemoryError
0 likes · 5 min read

This article explains how to generate a heap dump with jmap, import it into Eclipse Memory Analyzer (MAT), and interpret the various reports such as Histogram, Dominator Tree, Top Consumers, and Leak Suspects to identify memory leaks or insufficient heap sizing in Java applications.
Heap DumpJavaMAT
0 likes · 8 min read

This article explains the various OutOfMemoryError variants in the Java Virtual Machine, illustrates each with reproducible code examples, analyzes root causes, and provides practical mitigation strategies such as JVM flags, code refactoring, and system‑level adjustments.
JVMJavaOutOfMemoryError
0 likes · 20 min read

This guide explains the most important JVM parameters—such as -Xms, -Xmx, -Xss, and various -XX options—detailing how each setting influences heap, stack, and generation sizes and how proper configuration can avoid common OutOfMemoryError scenarios in Java applications.
JVMJavaOutOfMemoryError
0 likes · 3 min read

This article lists the most frequent Java OutOfMemoryError cases—including Java heap space, GC overhead limit exceeded, PermGen/Metaspace, native thread creation failures, array size limits, and direct buffer memory—explains their root causes, and provides practical troubleshooting steps and JVM tuning parameters to resolve them.
JVMOutOfMemoryErrorPerformance Tuning
0 likes · 11 min read

This article enumerates the most frequent Java OutOfMemoryError scenarios—including heap space exhaustion, GC overhead limits, oversized array allocations, PermGen/Metaspace depletion, thread creation failures, and native method errors—detailing their causes and practical JVM flag or code fixes to resolve them.
GCHeapJVM
0 likes · 7 min read

This article explains the common JVM OutOfMemoryError categories, analyzes a real‑world GC overhead limit exceeded incident, and demonstrates how applying the fail‑fast principle can help developers detect and resolve memory‑related failures more efficiently.
GCJVMJava
0 likes · 14 min read

The Meituan Android team traced a surge of OutOfMemoryError crashes to duplicated drawable caches created by the AppCompat vector‑from‑resources flag, reproduced the condition on OPPO N1 devices, used heap‑dump analysis to pinpoint oversized byte‑array allocations, and eliminated the issue by disabling the flag, dramatically cutting OOM incidents.
AndroidMeituanOutOfMemoryError
0 likes · 12 min read

The article explains that in Java a single thread hitting stack limits triggers StackOverflowError, while true OutOfMemoryError arises only when multiple threads exhaust the operating system's memory, and it offers practical tips to mitigate such OOM situations.
JVMMultithreadingOutOfMemoryError
0 likes · 5 min read

This article explains why Android apps encounter OutOfMemoryError, distinguishes memory leaks from heap overflow, and provides step‑by‑step guidance on using LeakCanary and the Eagle plugin for Eclipse to detect, compare, and fix memory leaks in Java applications.
AndroidEagleJava
0 likes · 5 min read

This tutorial explains how Java's automatic garbage collection works, covering the roles of System.gc(), memory regions such as Eden, Survivor and Old generations, reference types, object finalization, and includes code examples that illustrate GC eligibility and OutOfMemoryError scenarios.
FinalizeOutOfMemoryErrorgarbage-collection
0 likes · 10 min read
