Tag

Metaspace

0 views collected around this technical thread.

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.

JVMJavaMemory Management
0 likes · 5 min read
Understanding java.lang.OutOfMemoryError: Metaspace and How to Resolve It
DaTaobao Tech
DaTaobao Tech
Dec 11, 2024 · Backend Development

Resolving Metaspace and Off‑Heap Memory Issues After JDK 11 Upgrade

After upgrading core services to JDK 11, the team encountered a Metaspace rise and off‑heap memory growth caused by class‑loading changes and Netty’s disabled native buffers, which were resolved by expanding Metaspace to 768 MB and adding JVM options to enable Netty reflection and open required modules, restoring normal memory usage.

JDK11JVMMemoryLeak
0 likes · 8 min read
Resolving Metaspace and Off‑Heap Memory Issues After JDK 11 Upgrade
Sanyou's Java Diary
Sanyou's Java Diary
Oct 28, 2024 · Fundamentals

Master JVM Memory Troubleshooting: A Step‑by‑Step Guide

This comprehensive guide walks you through systematic JVM memory issue diagnosis, covering initial data collection, analysis of heap, metaspace, direct memory, stack problems, and practical command‑line tools, while offering actionable tips and real‑world examples for effective troubleshooting.

DirectMemoryJVMLinux
0 likes · 56 min read
Master JVM Memory Troubleshooting: A Step‑by‑Step Guide
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Aug 23, 2024 · Fundamentals

Understanding JVM Memory Structure and Object Lifecycle

This article explains the JVM memory architecture—including heap, stack, native stack, method area, and program counter—detailing heap generations, object allocation strategies, object layout, reference types, and the complete lifecycle of Java objects from creation to garbage collection.

Garbage CollectionJVMJava
0 likes · 11 min read
Understanding JVM Memory Structure and Object Lifecycle
JD Tech
JD Tech
Sep 18, 2023 · Fundamentals

Full GC Root Cause Analysis and Resolution in Java Applications

This article documents a step‑by‑step investigation of a high TP99 caused by frequent Full GC in a Java service, describing the diagnostic mindset, tools used, GC trigger conditions, object promotion mechanisms, the impact of AdaptiveSizePolicy and Metaspace, and the concrete configuration and code changes that eliminated the issue.

AdaptiveSizePolicyFullGCJVM
0 likes · 12 min read
Full GC Root Cause Analysis and Resolution in Java Applications
Java Architect Essentials
Java Architect Essentials
Aug 25, 2023 · Operations

JVM FullGC Optimization: Reducing Full GC Frequency from 40 Times a Day to Once Every 10 Days

This article documents a month‑long JVM garbage‑collection tuning process that reduced daily FullGC occurrences from over 40 to less than one per ten days by adjusting heap parameters, fixing memory leaks, and tuning Metaspace, while providing detailed analysis, code snippets, and performance graphs.

FullGCGarbage CollectionJVM
0 likes · 11 min read
JVM FullGC Optimization: Reducing Full GC Frequency from 40 Times a Day to Once Every 10 Days
Java Architect Essentials
Java Architect Essentials
Apr 20, 2023 · Operations

Diagnosing Metaspace OOM in Java Applications: A Step‑by‑Step Analysis

This article walks through a real‑world investigation of a Metaspace Out‑Of‑Memory error in a Java service, detailing how JVM monitoring tools, class‑loader behavior, and hot‑deployment agents contributed to the issue and presenting practical fixes and preventive measures.

ArthasClassLoaderJVM
0 likes · 12 min read
Diagnosing Metaspace OOM in Java Applications: A Step‑by‑Step Analysis
Sanyou's Java Diary
Sanyou's Java Diary
Dec 1, 2022 · Fundamentals

Mastering JVM Memory: From Heap to Metaspace and Beyond

This article provides a comprehensive overview of the Java Virtual Machine memory architecture, covering heap layout, object allocation, Metaspace, stack frames, native method stacks, program counters, direct memory, and code cache, complete with configuration tips and practical code examples.

Garbage CollectionJVMJava
0 likes · 18 min read
Mastering JVM Memory: From Heap to Metaspace and Beyond
Top Architect
Top Architect
Jul 30, 2022 · Fundamentals

Understanding JVM Memory Layout: Heap, Metaspace, Stacks and Program Counter Register

This article explains the JVM memory layout, covering the heap (young and old generations), Metaspace, virtual machine stacks, native method stacks, and the program‑counter register, while describing their roles, configuration parameters and how they interact during garbage collection and method execution.

Garbage CollectionJVMJava
0 likes · 14 min read
Understanding JVM Memory Layout: Heap, Metaspace, Stacks and Program Counter Register
Top Architect
Top Architect
Jun 24, 2022 · Fundamentals

Understanding JVM Memory Layout: Heap, Metaspace, Stacks, and Program Counter

This article explains the JVM memory architecture, covering the heap (young and old generations, Eden and Survivor spaces), Metaspace, virtual machine stacks, native method stacks, and the program counter register, while also illustrating key JVM parameters and bytecode execution with examples.

Garbage CollectionJVMJava
0 likes · 13 min read
Understanding JVM Memory Layout: Heap, Metaspace, Stacks, and Program Counter
Efficient Ops
Efficient Ops
Feb 10, 2022 · Operations

Why Did a Metaspace Misconfiguration Crash Our Elastic Cloud Service?

A production incident on an elastic‑cloud deployment revealed that setting the JVM Metaspace limit to 64 MiB, while the application required around 76 MiB, triggered continuous Full GC, causing stop‑the‑world pauses, full‑line time‑outs, and a costly rollback.

Elastic CloudGCIncident Analysis
0 likes · 9 min read
Why Did a Metaspace Misconfiguration Crash Our Elastic Cloud Service?
Efficient Ops
Efficient Ops
Sep 23, 2021 · Operations

Why Did Our New Deployment Crash? Uncovering Metaspace‑Induced Full‑GC

The article recounts a staged rollout of the Maybach service on elastic cloud, details the timeline of successful and failing deployments, analyzes JVM metrics revealing excessive Metaspace usage that triggered continuous full garbage collections, and explains how this caused system‑wide timeouts and a half‑hour outage.

Full GCIncident AnalysisJVM
0 likes · 10 min read
Why Did Our New Deployment Crash? Uncovering Metaspace‑Induced Full‑GC
Architect
Architect
Sep 9, 2021 · Fundamentals

Understanding JVM Memory Structure: Areas, Allocation, and Tuning

This article provides a comprehensive overview of the Java Virtual Machine memory layout, explaining each region such as the heap, metaspace, stack, program counter, direct memory and code cache, along with allocation strategies, tuning parameters, and practical OOM demonstrations.

Garbage CollectionJVMJava
0 likes · 16 min read
Understanding JVM Memory Structure: Areas, Allocation, and Tuning
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.

JVMJavaMemory Management
0 likes · 17 min read
Understanding Java Heap, Stack, Metaspace, and Direct Memory OutOfMemoryError with Examples
Xianyu Technology
Xianyu Technology
Dec 24, 2020 · Backend Development

Root Cause Analysis of Metaspace OOM Triggered by Arthas Trace

Tracing a large method with Arthas caused a Metaspace OOM because constant‑pool rewrites inflated the Non‑Class space, each rewrite copying a massive StackMapTable, but preserving the original constant‑pool layout in Arthas stops the growth, and exposing off‑heap metrics aids production monitoring.

ArthasBytecodeDiagnostics
0 likes · 20 min read
Root Cause Analysis of Metaspace OOM Triggered by Arthas Trace
Top Architect
Top Architect
Sep 24, 2020 · Fundamentals

Understanding JVM Memory Structure: Heap, Metaspace, Stack, Direct Memory and Code Cache

This article provides a comprehensive overview of the Java Virtual Machine memory layout, explaining the roles and allocation strategies of the heap, metaspace, stack frames, program counter, direct memory, and code cache, and includes practical code examples for heap tuning and OOM demonstration.

Garbage CollectionJVMJava
0 likes · 16 min read
Understanding JVM Memory Structure: Heap, Metaspace, Stack, Direct Memory and Code Cache
Selected Java Interview Questions
Selected Java Interview Questions
Jun 12, 2020 · Fundamentals

Deep Dive into Java ClassLoader, Class Loading Process, and the Parent‑Delegation Model

This article explains when and how Java classes are loaded, details the JVM's ClassLoader implementation—including the native defineClass1 method, InstanceKlass creation, SystemDictionary registration, and parallel loading locks—then demonstrates breaking the parent‑delegation model with a custom ClassLoader and discusses practical usage scenarios.

Class LoadingClassLoaderJVM
0 likes · 18 min read
Deep Dive into Java ClassLoader, Class Loading Process, and the Parent‑Delegation Model
Selected Java Interview Questions
Selected Java Interview Questions
Jun 11, 2020 · Fundamentals

Understanding Java Runtime Memory Areas and the Java Memory Model

This article explains the distinction between Java memory regions and the Java Memory Model, describes each JVM runtime data area—including the program counter, stacks, heap, metaspace, and direct memory—and outlines how the model governs visibility, ordering, and synchronization in concurrent programs.

Garbage CollectionJVMJava
0 likes · 20 min read
Understanding Java Runtime Memory Areas and the Java Memory Model
Architect's Tech Stack
Architect's Tech Stack
Jan 18, 2020 · Fundamentals

JVM Memory Architecture: Overview, Heap, Metaspace, Stack, and More

This article provides a comprehensive overview of the Java Virtual Machine memory layout, covering heap regions, Metaspace, stack frames, native method stack, program counter, direct memory, and code cache, along with configuration tips, diagnostic commands, and illustrative code examples to help readers understand memory allocation and garbage collection.

Garbage CollectionJVMJava
0 likes · 16 min read
JVM Memory Architecture: Overview, Heap, Metaspace, Stack, and More