Tagged articles
55 articles
Page 1 of 1
macrozheng
macrozheng
Jan 30, 2026 · Backend Development

Why MyBatis Triggers OutOfMemoryError and How to Fix It

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.

BackendHeapMemoryLeak
0 likes · 7 min read
Why MyBatis Triggers OutOfMemoryError and How to Fix It
Cognitive Technology Team
Cognitive Technology Team
Jul 6, 2025 · Backend Development

Why Spring WebClient Throws OutOfMemoryError and How to Fix It

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 NIOOutOfMemoryErrorSpring Boot
0 likes · 10 min read
Why Spring WebClient Throws OutOfMemoryError and How to Fix It
Java Backend Full-Stack
Java Backend Full-Stack
Apr 26, 2025 · Backend Development

Master ThreadLocal: Answer Interview Questions and Prevent OOM Leaks

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.

OutOfMemoryErrorThreadLocalconcurrency
0 likes · 11 min read
Master ThreadLocal: Answer Interview Questions and Prevent OOM Leaks
Thoughts on Knowledge and Action
Thoughts on Knowledge and Action
Apr 13, 2025 · Operations

How to Diagnose Java OOM Crashes with Eclipse MAT: Step‑by‑Step Guide

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 DumpMemory AnalyzerOutOfMemoryError
0 likes · 6 min read
How to Diagnose Java OOM Crashes with Eclipse MAT: Step‑by‑Step Guide
Cognitive Technology Team
Cognitive Technology Team
Apr 9, 2025 · Backend Development

Understanding java.lang.OutOfMemoryError: Metaspace and How to Resolve It

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.

JVMMemory ManagementMetaspace
0 likes · 5 min read
Understanding java.lang.OutOfMemoryError: Metaspace and How to Resolve It
Cognitive Technology Team
Cognitive Technology Team
Feb 20, 2025 · Backend Development

Understanding the Java Memory Model and Diagnosing OutOfMemoryError

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.

JVMMemory ManagementOutOfMemoryError
0 likes · 8 min read
Understanding the Java Memory Model and Diagnosing OutOfMemoryError
Lobster Programming
Lobster Programming
Feb 20, 2025 · Backend Development

Will a JVM Exit When a Thread Runs Out of Memory? Deep Dive with Code

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.

JVMOutOfMemoryErrorSpring Boot
0 likes · 6 min read
Will a JVM Exit When a Thread Runs Out of Memory? Deep Dive with Code
Java Backend Technology
Java Backend Technology
Oct 14, 2024 · Cloud Native

Why ExitOnOutOfMemoryError Beats HeapDumpOnOutOfMemoryError in Containerized Java Apps

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.

ContainerJVMKubernetes
0 likes · 11 min read
Why ExitOnOutOfMemoryError Beats HeapDumpOnOutOfMemoryError in Containerized Java Apps
JD Cloud Developers
JD Cloud Developers
Jun 26, 2024 · Backend Development

Understanding Java Heap Memory: Prevent OutOfMemory Errors and Optimize GC

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.

Garbage CollectionHeap MemoryOutOfMemoryError
0 likes · 10 min read
Understanding Java Heap Memory: Prevent OutOfMemory Errors and Optimize GC
Java Backend Technology
Java Backend Technology
Mar 19, 2024 · Backend Development

6 Common Java OOM Scenarios and How to Prevent Them

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.

HeapJVMMetaspace
0 likes · 9 min read
6 Common Java OOM Scenarios and How to Prevent Them
Su San Talks Tech
Su San Talks Tech
Mar 18, 2024 · Backend Development

6 Common Java OOM Scenarios and How to Prevent Them

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.

JVMMemory ManagementOutOfMemoryError
0 likes · 8 min read
6 Common Java OOM Scenarios and How to Prevent Them
Java Captain
Java Captain
Nov 11, 2023 · Backend Development

Analyzing and Reproducing OutOfMemoryError in MyBatis-based Java Services

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.

BackendMyBatisOutOfMemoryError
0 likes · 6 min read
Analyzing and Reproducing OutOfMemoryError in MyBatis-based Java Services
Java Captain
Java Captain
Nov 8, 2023 · Fundamentals

Understanding Java OOM Errors: Heap, GC Overhead, Metaspace, CodeCache, Direct Memory, and Linux OOM Killer

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.

CodeCacheJVMMemory Management
0 likes · 10 min read
Understanding Java OOM Errors: Heap, GC Overhead, Metaspace, CodeCache, Direct Memory, and Linux OOM Killer
Selected Java Interview Questions
Selected Java Interview Questions
Jul 24, 2023 · Backend Development

Analyzing and Reproducing OutOfMemoryError Caused by MyBatis and DruidDataSource in a Java Backend Service

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.

DockerMemoryLeakMyBatis
0 likes · 7 min read
Analyzing and Reproducing OutOfMemoryError Caused by MyBatis and DruidDataSource in a Java Backend Service
MaGe Linux Operations
MaGe Linux Operations
Jul 13, 2023 · Backend Development

How I Diagnosed and Fixed a Persistent Java OOM Crash in Mybatis

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.

HeapMemoryOutOfMemoryErrordebugging
0 likes · 6 min read
How I Diagnosed and Fixed a Persistent Java OOM Crash in Mybatis
Su San Talks Tech
Su San Talks Tech
Jun 19, 2023 · Backend Development

Master JVM Performance: Memory Model, OOM Cases, and Tuning Tools

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.

Garbage CollectionJVMMonitoring Tools
0 likes · 24 min read
Master JVM Performance: Memory Model, OOM Cases, and Tuning Tools
Su San Talks Tech
Su San Talks Tech
Mar 10, 2023 · Backend Development

Why Did Our Java Service Crash with OOM? A Deep Dive into Root Causes and Fixes

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.

BackendJVMOutOfMemoryError
0 likes · 8 min read
Why Did Our Java Service Crash with OOM? A Deep Dive into Root Causes and Fixes
ByteDance Terminal Technology
ByteDance Terminal Technology
Jan 11, 2022 · Fundamentals

Online Java OOM Attribution Solution Based on Hprof Memory Snapshots

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.

AndroidHprofMemoryAnalysis
0 likes · 24 min read
Online Java OOM Attribution Solution Based on Hprof Memory Snapshots
HomeTech
HomeTech
Dec 24, 2021 · Big Data

Handling java.lang.OutOfMemoryError in Hadoop MapReduce

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.

HadoopMapReduceOutOfMemoryError
0 likes · 11 min read
Handling java.lang.OutOfMemoryError in Hadoop MapReduce
Java Interview Crash Guide
Java Interview Crash Guide
Aug 11, 2021 · Fundamentals

Why Understanding JVM Memory Structure Is Crucial for Java Developers

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.

JVMOutOfMemoryErrorStackOverflowError
0 likes · 17 min read
Why Understanding JVM Memory Structure Is Crucial for Java Developers
JavaEdge
JavaEdge
Jul 2, 2021 · Backend Development

How to Diagnose and Reproduce Different Java OOM Errors

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.

DirectMemoryJVMMetaspace
0 likes · 16 min read
How to Diagnose and Reproduce Different Java OOM Errors
Programmer DD
Programmer DD
Jun 25, 2021 · Fundamentals

Can Other Threads Keep Running After a Java Thread Hits OOM?

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.

OutOfMemoryErrormemory-managementmultithreading
0 likes · 5 min read
Can Other Threads Keep Running After a Java Thread Hits OOM?
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jun 5, 2021 · Backend Development

Diagnosing and Resolving OutOfMemoryError Caused by Zipkin Reporter in Spring Cloud Applications

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.

BackendOutOfMemoryErrorSpring Cloud
0 likes · 11 min read
Diagnosing and Resolving OutOfMemoryError Caused by Zipkin Reporter in Spring Cloud Applications
Selected Java Interview Questions
Selected Java Interview Questions
Mar 10, 2021 · Fundamentals

Understanding Java Heap, Stack, Metaspace, and Direct Memory OutOfMemoryError with Examples

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.

HeapJVMMetaspace
0 likes · 17 min read
Understanding Java Heap, Stack, Metaspace, and Direct Memory OutOfMemoryError with Examples
Selected Java Interview Questions
Selected Java Interview Questions
Feb 7, 2021 · Fundamentals

Common Causes of Java Memory Leaks and How to Fix Them

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.

Garbage CollectionOutOfMemoryErrorWeakHashMap
0 likes · 10 min read
Common Causes of Java Memory Leaks and How to Fix Them
JavaEdge
JavaEdge
Dec 21, 2020 · Backend Development

Thread Pools That Cause OOM: Pitfalls of FixedThreadPool & CachedThreadPool

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.

ExecutorsOutOfMemoryErrorThreadPool
0 likes · 5 min read
Thread Pools That Cause OOM: Pitfalls of FixedThreadPool & CachedThreadPool
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 10, 2020 · Fundamentals

Common Java OutOfMemoryError Types and Their Solutions

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.

JVMMemory ManagementOutOfMemoryError
0 likes · 20 min read
Common Java OutOfMemoryError Types and Their Solutions
Programmer DD
Programmer DD
Feb 8, 2020 · Backend Development

Master Java Memory: Essential JVM Flags to Prevent OutOfMemory Errors

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.

JVMMemory ManagementOutOfMemoryError
0 likes · 3 min read
Master Java Memory: Essential JVM Flags to Prevent OutOfMemory Errors
Architect's Tech Stack
Architect's Tech Stack
Aug 1, 2019 · Fundamentals

Common Java OutOfMemoryError Types and Their Solutions

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.

JVMMemory ManagementOutOfMemoryError
0 likes · 11 min read
Common Java OutOfMemoryError Types and Their Solutions
Architect's Tech Stack
Architect's Tech Stack
Jul 10, 2019 · Backend Development

Common Java OutOfMemoryError Causes and Their Solutions

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.

HeapJVMOutOfMemoryError
0 likes · 7 min read
Common Java OutOfMemoryError Causes and Their Solutions
Seewo Tech Circle
Seewo Tech Circle
Jul 5, 2019 · Backend Development

Understanding JVM OutOfMemoryError Types and the Fail‑Fast Principle

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.

JVMOutOfMemoryErrorfail-fast
0 likes · 14 min read
Understanding JVM OutOfMemoryError Types and the Fail‑Fast Principle
Meituan Technology Team
Meituan Technology Team
Apr 14, 2017 · Mobile Development

Analyzing and Solving OutOfMemoryError (OOM) in Meituan Android App

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
Analyzing and Solving OutOfMemoryError (OOM) in Meituan Android App