Tagged articles

Memory Leak

295 articles · Page 1 of 3
Java Captain
Java Captain
Sep 23, 2026 · Fundamentals

5 Common Java Memory Leak Scenarios and How to Detect Them

This article explains five common Java memory leak scenarios—long-lived collections, unclosed resources, ThreadLocal misuse, inner class references, and unregistered listeners—with code examples and recommends MAT and VisualVM for leak detection.

Garbage CollectionInner ClassJava
0 likes · 5 min read
5 Common Java Memory Leak Scenarios and How to Detect Them
liandk
liandk
Sep 22, 2026 · Backend Development

Java Memory Leak Deep Dive: 10 Hidden Scenarios, MAT Analysis & Prevention

This comprehensive guide covers 10 hidden Java memory leak scenarios, a 6-step MAT-based investigation SOP, code-level fixes for ThreadLocal and static collections, emergency mitigation tactics, and long-term prevention standards to eliminate recurring OOM crashes.

GCJVMJava
0 likes · 15 min read
Java Memory Leak Deep Dive: 10 Hidden Scenarios, MAT Analysis & Prevention
liandk
liandk
Sep 18, 2026 · Backend Development

Java Production Troubleshooting: Universal SOP & 10 Failure Cheat Sheet

This series finale presents a universal 6-step SOP for Java production troubleshooting, a bottom-up layered diagnosis model, a quick-reference guide for 10 common failure patterns with symptoms, root causes, and tools, plus five golden principles for incident handling.

ArthasGC AnalysisJVM
0 likes · 16 min read
Java Production Troubleshooting: Universal SOP & 10 Failure Cheat Sheet
Xike
Xike
Sep 9, 2026 · Fundamentals

ThreadLocal Internals: How It Works, Why It Leaks, and Safe Usage Patterns

ThreadLocal provides per-thread variable copies via a ThreadLocalMap with weak-reference keys and strong-reference values, enabling request-context storage and non-thread-safe object reuse, but risks memory leaks in long-lived thread pools unless explicitly removed, and requires careful handling for cross-thread propagation.

InheritableThreadLocalJava concurrencyMemory Leak
0 likes · 14 min read
ThreadLocal Internals: How It Works, Why It Leaks, and Safe Usage Patterns
Alibaba Cloud Infrastructure
Alibaba Cloud Infrastructure
Aug 4, 2026 · Artificial Intelligence

Why Is GPU Utilization Low and Hard to Diagnose? Try This Zero‑Intrusion AI Profiling Tool

Low GPU utilization and mysterious memory growth often stall AI workloads, but existing tools are intrusive and limited; SysOM AI Profiling offers zero‑intrusion, one‑click, multi‑dimensional analysis across training and inference, with timeline visualisation, memory‑snapshot, and iteration‑anchored diff, demonstrated by vLLM memory‑leak detection and SGLang vs vLLM performance comparison.

AI profilingGPU utilizationMemory Leak
0 likes · 11 min read
Why Is GPU Utilization Low and Hard to Diagnose? Try This Zero‑Intrusion AI Profiling Tool
Deepin Linux
Deepin Linux
Jul 14, 2026 · Backend Development

How to Diagnose C++ Memory Leaks and Segmentation Faults for High‑Frequency Interviews

The article explains why memory leaks and segmentation faults are hard‑to‑detect hidden bugs in Linux C++ back‑end and embedded development, illustrates common causes with concrete code samples, and walks through Linux commands and tools such as top, ps, pmap, vmstat, Valgrind, AddressSanitizer, memleak and gdb to locate and fix these issues.

Memory Leakaddresssanitizerdebugging
0 likes · 25 min read
How to Diagnose C++ Memory Leaks and Segmentation Faults for High‑Frequency Interviews
Raymond Ops
Raymond Ops
Jul 1, 2026 · Operations

Memory Leak Postmortem: Combining free, smem, pmap, and perf for Effective Diagnosis

When a thumbnail service experienced sudden latency spikes and OOM kills shortly after a new release, the author walks through a systematic investigation using free, smem, pmap, and perf to distinguish true memory leaks from page‑cache or shared‑page artifacts, pinpoint the native decoder buffer issue, and outline remediation steps.

KubernetesLinuxMemory Leak
0 likes · 29 min read
Memory Leak Postmortem: Combining free, smem, pmap, and perf for Effective Diagnosis
Coder Trainee
Coder Trainee
Jun 26, 2026 · Backend Development

Java Performance Tuning: Practical Guide to Detecting and Fixing Memory Leaks

This article explains how to differentiate memory leaks from out‑of‑memory errors, identifies classic GC‑based leak signals, introduces a toolchain (jstat, jmap, MAT, Arthas, JProfiler), walks through a step‑by‑step investigation workflow, lists common leak patterns, presents a real‑world ThreadLocal leak case, and offers preventive measures such as monitoring, regular heap dumps, code review, and stress testing.

ArthasGCJava
0 likes · 9 min read
Java Performance Tuning: Practical Guide to Detecting and Fixing Memory Leaks
Alibaba Cloud Observability
Alibaba Cloud Observability
Jun 22, 2026 · Operations

How One‑Line Code Turns Electron Apps into Fully Observable Desktop Agents

The article analyzes the monitoring blind spots of Electron's dual‑process architecture—native crashes, fragmented data, unreliable reporting, and IPC opacity—and presents @arms/rum-electron, a zero‑config SDK that injects full‑stack observability, WASM‑based crash parsing, tRPC tracing, memory‑leak detection, and multi‑protocol distributed tracing, while comparing it to Sentry and generic RUM solutions.

Crash MonitoringElectronMemory Leak
0 likes · 15 min read
How One‑Line Code Turns Electron Apps into Fully Observable Desktop Agents
Deepin Linux
Deepin Linux
Jun 21, 2026 · Backend Development

Why Off‑Heap Memory Can Leak on Linux—and How to Avoid It

The article explains how off‑heap memory and mmap enable zero‑copy I/O for high‑performance Linux services, but because the JVM does not manage it, careless allocation or missing releases can cause off‑heap memory leaks that lead to OOM, and it provides concrete detection and mitigation techniques.

C++JavaLinux
0 likes · 24 min read
Why Off‑Heap Memory Can Leak on Linux—and How to Avoid It
dbaplus Community
dbaplus Community
Jun 8, 2026 · Operations

Can You Really Let a Memory Leak Run? Practical Insights and Risks

The article compiles several Zhihu answers that debate the feasibility of deliberately tolerating memory leaks by relying on periodic restarts, covering techniques like NPI‑GC, GitLab Sidekiq memory‑killer settings, Linux OOM‑killer configuration, and real‑world anecdotes that illustrate both benefits and drawbacks.

Memory LeakNPI-GCOOM Killer
0 likes · 7 min read
Can You Really Let a Memory Leak Run? Practical Insights and Risks
samdeepthink
samdeepthink
Jun 1, 2026 · Backend Development

Why One ThreadLocal Instance Suffices for an Entire Business Scenario

The article explains that a single ThreadLocal object can be shared across dozens of threads because the actual data lives in each thread's own ThreadLocalMap, outlines how set/get work, highlights thread‑pool pitfalls such as stale data and memory leaks, and provides best‑practice guidelines for static declaration, proper removal, and using TransmittableThreadLocal for cross‑thread propagation.

ConcurrencyJavaMemory Leak
0 likes · 10 min read
Why One ThreadLocal Instance Suffices for an Entire Business Scenario
Programmer1970
Programmer1970
May 25, 2026 · Backend Development

How a Full GC Spike Turned 50 ms P99 Latency into 3 s – Full Investigation

When a monitoring alarm showed the /api/order/create endpoint’s P99 latency jump from under 50 ms to over 3 s, the team traced the root cause to a Full GC storm caused by an unbounded static HashMap cache, using Arthas, heap dumps, MAT analysis, and finally applied both quick‑fix and permanent code changes to restore performance.

ArthasCaffeineEclipse MAT
0 likes · 8 min read
How a Full GC Spike Turned 50 ms P99 Latency into 3 s – Full Investigation
Java Architect Handbook
Java Architect Handbook
May 21, 2026 · Backend Development

How to Diagnose Frequent Full GC in Production Systems? (Second Interview at Taobao)

The article explains why Full GC should be minimized, defines normal versus abnormal GC frequencies, outlines the root causes of Full GC, and provides a step‑by‑step troubleshooting workflow with concrete code snippets, monitoring commands and real‑world examples for Java backend engineers.

Full GCGarbage CollectionJVM Performance
0 likes · 13 min read
How to Diagnose Frequent Full GC in Production Systems? (Second Interview at Taobao)
Black & White Path
Black & White Path
May 9, 2026 · Information Security

Ollama ‘Bleeding Llama’ Vulnerability Puts 300K Servers at Risk of Sensitive Data Exposure

A critical CVE‑2026‑7482 flaw in Ollama’s model quantization pipeline, dubbed “Bleeding Llama,” allows unauthenticated attackers to craft GGUF files that read beyond buffer limits, potentially leaking prompts, API keys and other confidential data from over 300,000 internet‑exposed servers, with mitigation requiring an upgrade to version 0.17.1 and stricter network controls.

AI securityBleeding LlamaCVE-2026-7482
0 likes · 5 min read
Ollama ‘Bleeding Llama’ Vulnerability Puts 300K Servers at Risk of Sensitive Data Exposure
liandk
liandk
May 8, 2026 · Mobile Development

Avoid Common uni.storage Pitfalls: Are You Making These Mistakes?

uni.storage, the data‑persistence solution for UniApp, can cause data loss, memory leaks, security risks, and performance problems if misused; this guide outlines four typical pitfalls—large objects, missing expiration, frequent reads/writes, and unhandled async errors—and provides concrete best‑practice fixes.

CachingMemory Leakdata persistence
0 likes · 4 min read
Avoid Common uni.storage Pitfalls: Are You Making These Mistakes?
CodeNotes
CodeNotes
May 2, 2026 · Frontend Development

Mastering React useEffect: The Complete Guide to Avoid Common Pitfalls

This guide explains what useEffect does, its three core execution rules, how dependency arrays change its behavior, eight practical scenarios, six typical pitfalls with concrete code examples, and best‑practice recommendations for writing clean, leak‑free React functional components.

HooksJavaScriptMemory Leak
0 likes · 10 min read
Mastering React useEffect: The Complete Guide to Avoid Common Pitfalls
Java Web Project
Java Web Project
Apr 16, 2026 · Backend Development

How I Resolved a 13‑Hour OOM Nightmare in a Spring Boot Service

The article walks through a 13‑hour out‑of‑memory incident on a Spring Boot 2.7 service running in Kubernetes, detailing how to preserve the crash dump, interpret GC logs, use MAT and Arthas to pinpoint a static HashMap leak, and apply both temporary and permanent fixes while hardening the system for future safety.

ArthasJVMJava
0 likes · 18 min read
How I Resolved a 13‑Hour OOM Nightmare in a Spring Boot Service
WeiLi Technology Team
WeiLi Technology Team
Mar 31, 2026 · Backend Development

Why ThreadLocal Leaks Cause Full GC in Thread Pools and How to Fix It

An online service experienced frequent Full GC due to a ThreadLocal memory leak in a thread‑pool scenario; the article walks through GC log analysis, heap dump inspection, root‑cause discovery in ThreadFactory logic, and presents a robust fix using Spring’s TaskDecorator to ensure proper cleanup.

GCJavaMemory Leak
0 likes · 14 min read
Why ThreadLocal Leaks Cause Full GC in Thread Pools and How to Fix It
MaGe Linux Operations
MaGe Linux Operations
Mar 10, 2026 · Operations

How to Diagnose and Fix Memory Leaks in a Containerized Image Thumbnail Service

This guide walks through a systematic, step‑by‑step process for identifying, analyzing, and resolving memory‑related incidents in a high‑traffic thumbnail generation service running in Kubernetes, covering everything from initial symptom checks with free and vmstat to deep dives using smem, pmap, smaps, perf, and post‑mortem verification.

Memory Leakperfsmem
0 likes · 30 min read
How to Diagnose and Fix Memory Leaks in a Containerized Image Thumbnail Service
IT Services Circle
IT Services Circle
Mar 1, 2026 · Interview Experience

Li Auto Java Campus Interview Guide: Salary Insights and Core Java Q&A

This article combines Li Auto's 2026 campus recruitment salary data—showing typical offers ranging from 25k to 32k monthly with 14‑16 month packages—and a comprehensive Java interview cheat‑sheet covering inheritance vs interfaces, Map implementations, String handling, ConcurrentHashMap internals, reference types, memory‑leak detection, design patterns, observer pattern, multithreading, Future execution, and deadlock prevention.

ConcurrentHashMapJavaLi Auto
0 likes · 27 min read
Li Auto Java Campus Interview Guide: Salary Insights and Core Java Q&A
Deepin Linux
Deepin Linux
Feb 14, 2026 · Operations

Master Linux Memory Troubleshooting: Detect Leaks and High Usage Efficiently

This guide walks Linux operators through the fundamentals of memory management, explains key metrics, and provides step‑by‑step instructions for using tools like top, free, vmstat, pmap, valgrind, smem, smaps and slabtop to pinpoint and resolve memory leaks and excessive memory consumption in production systems.

Debugging ToolsMemory LeakPerformance Monitoring
0 likes · 45 min read
Master Linux Memory Troubleshooting: Detect Leaks and High Usage Efficiently
Code Wrench
Code Wrench
Feb 1, 2026 · Operations

Detect and Fix Goroutine Leaks in Go with Context & pprof

This guide explains how Goroutine leaks cause hidden memory and CPU issues in long‑running Go health‑check tools, demonstrates how to reproduce the problem, and shows step‑by‑step detection using pprof and context, plus a production‑ready zero‑leak probe template with best‑practice code.

Memory Leakopspprof
0 likes · 12 min read
Detect and Fix Goroutine Leaks in Go with Context & pprof
Instant Consumer Technology Team
Instant Consumer Technology Team
Jan 9, 2026 · Frontend Development

How to Eliminate Frontend Memory Leaks: A Full‑Chain Governance Blueprint

This article presents a comprehensive frontend memory‑leak mitigation system that combines custom ESLint rules, layered testing, and production‑level monitoring to shift leak detection from runtime crashes to code‑commit time, cutting fix cost from days to minutes and achieving a 99% crash‑rate reduction.

ESLintMemory LeakPerformance
0 likes · 29 min read
How to Eliminate Frontend Memory Leaks: A Full‑Chain Governance Blueprint
Tech Musings
Tech Musings
Jan 2, 2026 · Information Security

Why MongoDB’s CVE‑2025‑14847 Lets Attackers Leak Secrets Like Heartbleed

The article explains the CVE‑2025‑14847 MongoDB vulnerability, detailing how crafted BSON with a falsified document length triggers memory over‑read, demonstrates a reproducible PoC, compares it to the SSL Heartbleed bug, and offers mitigation advice for affected deployments.

CVE-2025-14847CompressionHeartbleed
0 likes · 8 min read
Why MongoDB’s CVE‑2025‑14847 Lets Attackers Leak Secrets Like Heartbleed
FunTester
FunTester
Dec 19, 2025 · Frontend Development

How to Detect and Fix Memory Leaks in React Applications

This guide explains why memory leaks occur in React, how to spot early warning signs, and provides step‑by‑step techniques—including Chrome DevTools, React DevTools, and proper cleanup of timers, event listeners, fetch requests, and refs—to prevent and resolve leaks for more stable applications.

Memory LeakPerformanceReAct
0 likes · 13 min read
How to Detect and Fix Memory Leaks in React Applications
Alibaba Cloud Infrastructure
Alibaba Cloud Infrastructure
Nov 25, 2025 · Operations

How to Uncover Hidden Java Memory Leaks in Kubernetes Pods

This article explains why Java applications in cloud containers often encounter OOMKilled pods, details the hidden memory consumption from JNI, libc, and Transparent Huge Pages, and demonstrates step‑by‑step how to use Alibaba Cloud OS Console's memory panorama analysis to identify and mitigate the root causes.

DiagnosticsJNIKubernetes
0 likes · 11 min read
How to Uncover Hidden Java Memory Leaks in Kubernetes Pods
Linux Kernel Journey
Linux Kernel Journey
Nov 17, 2025 · Operations

Four Diagrams to Quickly Diagnose Linux Memory Leaks

This guide explains Linux's virtual‑physical memory model, shows how to inspect system and process memory via /proc files, demonstrates a 100 MiB allocation test, and provides a step‑by‑step workflow—including ps sorting and Valgrind usage—to locate and fix memory leaks.

LinuxMemory Leakdebugging
0 likes · 16 min read
Four Diagrams to Quickly Diagnose Linux Memory Leaks
FunTester
FunTester
Nov 7, 2025 · Frontend Development

Prevent Memory Leaks and Master Event Handling in JavaScript

This article explains how forgetting to remove event listeners can cause memory leaks, demonstrates proper listener cleanup, addresses closure pitfalls in loops, introduces event delegation, and provides practical debounce, throttle, naming conventions, and debugging techniques for robust frontend development.

Memory Leakdebounceevent delegation
0 likes · 16 min read
Prevent Memory Leaks and Master Event Handling in JavaScript
Code Mala Tang
Code Mala Tang
Nov 5, 2025 · Backend Development

How to Detect and Fix Memory Leaks in Long-Running Node.js Apps

Memory leaks can silently cripple long-running Node.js servers, but by understanding V8’s memory management, recognizing common leak patterns, and using tools like manual monitoring, Chrome DevTools snapshots, clinic.js or memwatch-next, developers can detect, diagnose, and fix leaks to keep performance stable.

Memory LeakV8
0 likes · 8 min read
How to Detect and Fix Memory Leaks in Long-Running Node.js Apps
Tech Stroll Journey
Tech Stroll Journey
Oct 28, 2025 · Operations

Detect and Fix Linux Memory Leaks with memleak and vmstat

This guide explains how Linux memory leaks occur, why they harm system stability, and provides step‑by‑step commands—including top, ps, pmap, vmstat, and the memleak utility—to identify, monitor, and resolve leaking processes efficiently.

LinuxMemory Leakmemleak
0 likes · 6 min read
Detect and Fix Linux Memory Leaks with memleak and vmstat
Deepin Linux
Deepin Linux
Oct 20, 2025 · Fundamentals

How to Detect and Fix C++ Memory Leaks on Linux: Tools, Tips, and Code

This article explains what memory leaks are in C++ on Linux, why they matter, how they occur, and provides practical guidance on detecting them with tools like Valgrind, AddressSanitizer, GDB, and mtrace, followed by concrete solutions such as proper new/delete usage, smart pointers, RAII, custom allocators, and memory pools.

C++LinuxMemory Leak
0 likes · 39 min read
How to Detect and Fix C++ Memory Leaks on Linux: Tools, Tips, and Code
DeWu Technology
DeWu Technology
Oct 13, 2025 · Backend Development

TTL Agent Pitfalls: Memory Leaks & CPU Spikes in Java – Cases & Fixes

This article explains how the Transmittable ThreadLocal (TTL) Java agent works, why improper usage can cause context contamination, memory leaks, and CPU spikes, and provides real production cases, code examples, and practical recommendations to avoid these pitfalls.

ConcurrencyJava AgentMemory Leak
0 likes · 15 min read
TTL Agent Pitfalls: Memory Leaks & CPU Spikes in Java – Cases & Fixes
Liangxu Linux
Liangxu Linux
Sep 28, 2025 · Fundamentals

Why Memory Leaks Hurt Your Programs and How to Detect Them

This article explains what memory leaks are, distinguishes different leak types such as space leaks and fragmentation, shows how unreferenced allocations cause hidden waste, and introduces common detection tools like Valgrind, AddressSanitizer, and tcmalloc Heap Profiler.

C ProgrammingMemory LeakPerformance
0 likes · 7 min read
Why Memory Leaks Hurt Your Programs and How to Detect Them
Cognitive Technology Team
Cognitive Technology Team
Sep 22, 2025 · Backend Development

Why /tmp Can Crash Your Spring Boot App and How to Fix It

An e‑commerce Spring Boot service crashed when uploading large files because Linux’s /tmp is a memory‑based tmpfs that fills RAM, causing OOM kills; the article explains the underlying tmpfs behavior, common pitfalls, and a three‑step solution using /var/tmp with proper configuration and permissions.

Linux tmpfsMemory LeakSpring Boot
0 likes · 9 min read
Why /tmp Can Crash Your Spring Boot App and How to Fix It
macrozheng
macrozheng
Aug 8, 2025 · Backend Development

Master Java Backend: ThreadLocal, Memory Leaks, Spring Bean Lifecycle & AOP

This guide covers evaluating engineer hourly wages, interview self‑introduction tips, local vs distributed cache choices, ThreadLocal usage, memory‑leak detection with MAT, deadlock troubleshooting, Spring Bean lifecycle, AOP implementation, and Redis‑based distributed locks, plus resources for Spring Boot projects.

AOPCachingJava
0 likes · 20 min read
Master Java Backend: ThreadLocal, Memory Leaks, Spring Bean Lifecycle & AOP
Java Architect Essentials
Java Architect Essentials
Jul 22, 2025 · Backend Development

How Static Variables Can Turn Your App Into a Memory‑Leaking Monster

This article reveals how seemingly harmless static variables in Java can become hidden memory killers, illustrates real-world crashes caused by static caches and configuration, and provides three practical techniques—including weak references, lifecycle‑bound clearing, and leak‑detection tools—to prevent memory leaks in Android and backend applications.

AndroidBackendMemory Leak
0 likes · 6 min read
How Static Variables Can Turn Your App Into a Memory‑Leaking Monster
Java Architect Essentials
Java Architect Essentials
Jul 8, 2025 · Backend Development

Diagnose Java Memory Leaks in Minutes with Spring Boot Actuator and Arthas

This article explains why traditional heap dump and stack trace analysis are cumbersome, and shows how combining Spring Boot Actuator metrics with the Arthas diagnostic tool provides real‑time monitoring, rapid object inspection, and precise leak root‑cause identification, dramatically speeding up Java OOM troubleshooting.

ActuatorArthasMemory Leak
0 likes · 14 min read
Diagnose Java Memory Leaks in Minutes with Spring Boot Actuator and Arthas
Code Ape Tech Column
Code Ape Tech Column
Jul 3, 2025 · Backend Development

How to Detect and Fix Memory Leaks in Spring Boot Applications

This guide explains the fundamentals of memory leaks in Java, outlines common causes in Spring Boot, and provides step‑by‑step techniques—including GC log analysis, JConsole, VisualVM, MAT, Actuator, custom endpoints, jstack, BTrace, and best‑practice recommendations—to identify, diagnose, and prevent memory leaks for stable long‑running services.

Heap DumpJVMMemory Leak
0 likes · 18 min read
How to Detect and Fix Memory Leaks in Spring Boot Applications
Programmer1970
Programmer1970
Jun 17, 2025 · Fundamentals

Why Does Full GC Happen Frequently in the JVM? Common Scenarios and Fixes

Full GC pauses all application threads and degrades performance; this article explains frequent Full GC causes such as memory leaks, large object allocation, old‑generation and metaspace shortages, and mis‑configured JVM parameters, and provides concrete detection tools and optimization strategies for each garbage collector.

Full GCGC TuningGarbage Collection
0 likes · 8 min read
Why Does Full GC Happen Frequently in the JVM? Common Scenarios and Fixes
JavaScript
JavaScript
Jun 16, 2025 · Frontend Development

5 Hidden JavaScript Pitfalls That Can Break Your Code

This article uncovers five subtle JavaScript pitfalls—including async/await errors, Promise.all fail‑fast behavior, array mutation during iteration, closure‑induced memory leaks, and shallow versus deep copying—providing clear examples and best‑practice solutions to write more robust, predictable code.

Deep CopyJavaScriptMemory Leak
0 likes · 10 min read
5 Hidden JavaScript Pitfalls That Can Break Your Code
Lobster Programming
Lobster Programming
Jun 3, 2025 · Backend Development

How ThreadLocal Can Cause Memory Leaks in Java Multithreading

This article explains how ThreadLocal creates per‑thread variable copies, demonstrates its usage with sample Java code, illustrates the internal storage structure, and reveals why improper handling can lead to memory leaks when thread‑local values persist in thread pools.

JavaMemory LeakThreadLocal
0 likes · 3 min read
How ThreadLocal Can Cause Memory Leaks in Java Multithreading
Selected Java Interview Questions
Selected Java Interview Questions
May 22, 2025 · Backend Development

Root Cause Analysis of Excessive Native Memory Usage in a Spring Boot Application after Migrating to MDP Framework

After migrating a project to the MDP framework based on Spring Boot, the system repeatedly reported high swap usage; the author investigated JVM settings, used tools like jcmd, pmap, gperftools, strace, and GDB, identified native memory leaks caused by Spring Boot’s Reflections scanning and Inflater usage, and resolved the issue by configuring scan paths and fixing Inflater handling.

Memory LeakNative MemoryPerformance
0 likes · 13 min read
Root Cause Analysis of Excessive Native Memory Usage in a Spring Boot Application after Migrating to MDP Framework
Cognitive Technology Team
Cognitive Technology Team
May 3, 2025 · Backend Development

Understanding ThreadLocal: Core Principles, Use Cases, Pitfalls, and Best Practices

ThreadLocal provides per‑thread variable storage to achieve thread isolation, improving concurrency performance, and is essential for safe data handling in Java, but improper use can cause memory leaks, data contamination, and other issues; this article explains its internal mechanism, common scenarios, pitfalls, and best‑practice guidelines with code examples.

ConcurrencyJavaMemory Leak
0 likes · 19 min read
Understanding ThreadLocal: Core Principles, Use Cases, Pitfalls, and Best Practices
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.

ConcurrencyJavaMemory Leak
0 likes · 11 min read
Master ThreadLocal: Answer Interview Questions and Prevent OOM Leaks
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Feb 19, 2025 · Frontend Development

Debugging and Fixing Memory Leaks in Vue2 Applications

This article walks through reproducing a memory‑leak scenario in a Vue2‑based terminal application, analyzes common leak causes, demonstrates how adding dynamic keys and patching Vue's sameVnode function resolves the issue, and shows how to ship the fix with patch‑package for production deployments.

KEYMemory LeakVue
0 likes · 9 min read
Debugging and Fixing Memory Leaks in Vue2 Applications
JavaScript
JavaScript
Feb 8, 2025 · Frontend Development

Avoid JavaScript Closure Pitfalls: Memory Leaks, Shared Variables, and Side Effects

This article explains how JavaScript closures, while powerful for encapsulation and modularity, can cause memory leaks, unexpected variable sharing in loops, and side‑effects when external variables are modified, and provides practical solutions such as releasing references, using let, IIFEs, bind, and immutable patterns.

JavaScriptLoopMemory Leak
0 likes · 6 min read
Avoid JavaScript Closure Pitfalls: Memory Leaks, Shared Variables, and Side Effects
IT Services Circle
IT Services Circle
Jan 29, 2025 · Backend Development

How to Handle Frequent Full GC and High CPU Usage in Java Backend Development

This article explains common interview questions on frequent Full GC and high CPU usage in Java backend development, detailing root causes, JVM parameter adjustments, memory leak prevention, and code optimization techniques, along with practical code examples and tool recommendations for effective performance tuning.

CPU OptimizationFull GCJVM
0 likes · 8 min read
How to Handle Frequent Full GC and High CPU Usage in Java Backend Development
Radish, Keep Going!
Radish, Keep Going!
Dec 31, 2024 · Backend Development

How to Spot and Prevent Common Go Memory Leaks

This article examines typical Go memory‑leak scenarios—including unclosed files, forgotten HTTP response bodies, slice sharing, goroutine and channel misuse, improper finalizers, and outdated ticker handling—provides concrete code examples, and offers practical techniques such as using strings.Clone, buffered channels, and proper defer usage to avoid leaks.

Memory Leakgoroutineresource management
0 likes · 9 min read
How to Spot and Prevent Common Go Memory Leaks
JavaScript
JavaScript
Dec 31, 2024 · Frontend Development

Detect and Fix Common JavaScript Memory Leaks in Front‑End Development

This guide explains what JavaScript memory leaks are, illustrates typical front‑end leak scenarios such as forgotten timers, detached DOM references, improper closures, global variables, open WebSockets, misuse of Map/Set, and console logs, and provides practical solutions to prevent and resolve each issue.

Garbage CollectionJavaScriptMemory Leak
0 likes · 7 min read
Detect and Fix Common JavaScript Memory Leaks in Front‑End Development
Sohu Tech Products
Sohu Tech Products
Dec 25, 2024 · Mobile Development

Why BuildContext Leaks Memory in Flutter and How to Prevent It

This article explains how BuildContext and various closure patterns in Flutter can cause memory leaks, demonstrates typical leak scenarios with code examples, and provides practical strategies such as disposing listeners, nullifying references, and using WeakReference or Finalizer to ensure proper garbage collection.

AnimationControllerBuildContextDart
0 likes · 10 min read
Why BuildContext Leaks Memory in Flutter and How to Prevent It
Open Source Tech Hub
Open Source Tech Hub
Dec 7, 2024 · Backend Development

Detecting and Preventing Memory Leaks in the Webman PHP Framework

This article explains what memory leaks are, why they matter for the long‑running Webman PHP framework, outlines the two conditions that cause leaks, demonstrates a faulty static‑array implementation with load‑testing results, provides corrected code, and summarizes best practices to avoid unbounded memory growth.

Memory LeakPHPPerformance
0 likes · 5 min read
Detecting and Preventing Memory Leaks in the Webman PHP Framework
ITPUB
ITPUB
Nov 1, 2024 · Backend Development

Why Our Nginx Data Gateway OOM’d: Tracing Memory Spikes & Core Dumps

An Nginx‑based data collection gateway began crashing with OOM kills, prompting a detailed investigation that uncovered memory spikes caused by aggressive batch processing, oversized protobuf payloads, and insufficient memory‑pool management, leading to a custom core‑dump solution and several mitigation strategies.

Batch ProcessingMemory LeakOOM
0 likes · 16 min read
Why Our Nginx Data Gateway OOM’d: Tracing Memory Spikes & Core Dumps
FunTester
FunTester
Sep 30, 2024 · Backend Development

Unlock Java Performance: Essential Profiling Techniques and Tools

This guide introduces Java performance analysis fundamentals, covering profiling tools, key metrics such as CPU, memory, thread behavior, and practical methods to detect and resolve common issues like memory leaks, GC pauses, high CPU usage, I/O bottlenecks, and inefficient collection usage.

CPU analysisGarbage CollectionJava
0 likes · 13 min read
Unlock Java Performance: Essential Profiling Techniques and Tools
Selected Java Interview Questions
Selected Java Interview Questions
Aug 31, 2024 · Backend Development

Root Cause Analysis of Excessive Swap Usage in a Spring Boot Project: Native Memory Leak Triggered by MCC Package Scanning

This article details a step‑by‑step investigation of a Spring Boot application that consumed far more physical memory than its 4 GB heap limit, revealing a native‑memory leak caused by MCC's package‑scanning using Reflections and the Spring Boot ZipInflaterInputStream, and explains how configuration changes and newer Spring Boot versions resolve the issue.

JVMJavaMCC
0 likes · 13 min read
Root Cause Analysis of Excessive Swap Usage in a Spring Boot Project: Native Memory Leak Triggered by MCC Package Scanning
Deepin Linux
Deepin Linux
Aug 26, 2024 · Fundamentals

Understanding and Preventing Memory Leaks in C++ Applications

The article explains what memory leaks are, common causes, and presents practical techniques such as avoiding heap allocations, using smart pointers, employing arena allocators, leveraging coroutines, applying RAII, and debugging with tools like gperftools to detect and resolve leaks in C++ programs.

ArenaC++Memory Leak
0 likes · 12 min read
Understanding and Preventing Memory Leaks in C++ Applications
Programmer DD
Programmer DD
Aug 16, 2024 · Backend Development

How a Hidden Uint Overflow Triggered Massive Traffic Spikes and the Memory‑Leak Mystery I Solved

This article recounts a developer's journey from a fresh graduate to a senior backend engineer, detailing two real‑world incidents—a pseudo‑memory‑leak in a C++ service and a uint overflow that caused traffic bursts—showing the analysis steps, code fixes, and lessons learned for reliable backend development.

C++Memory LeakPerformance Optimization
0 likes · 19 min read
How a Hidden Uint Overflow Triggered Massive Traffic Spikes and the Memory‑Leak Mystery I Solved
Liangxu Linux
Liangxu Linux
Aug 12, 2024 · Fundamentals

Understanding C Memory Leaks: Causes, Detection, and Prevention

This article explains why memory leaks occur only with heap allocations in C, describes how malloc and related functions allocate memory, outlines two common ways to obtain heap memory, identifies the three essential elements of a leak, debunks common freeing misconceptions, and provides practical inspection steps to prevent leaks.

C++HeapMemory Leak
0 likes · 6 min read
Understanding C Memory Leaks: Causes, Detection, and Prevention
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Aug 4, 2024 · Backend Development

Understanding Java Memory Leaks and How to Prevent Them

This article explains what memory leaks are in Java, outlines common causes such as unreleased resources, static collections, misuse of ThreadLocal, improper variable scope, inner‑class references and off‑heap memory, and provides practical solutions and best‑practice recommendations to avoid them.

JVMJavaMemory Leak
0 likes · 9 min read
Understanding Java Memory Leaks and How to Prevent Them
Code Mala Tang
Code Mala Tang
Aug 2, 2024 · Frontend Development

Why Your setTimeout Can Leak Gigabytes: JavaScript GC Explained

This article examines how JavaScript's garbage collection works, why large objects allocated in setTimeout callbacks can cause memory leaks, and provides practical code examples and strategies to prevent such leaks in V8-powered environments.

Memory LeakV8
0 likes · 10 min read
Why Your setTimeout Can Leak Gigabytes: JavaScript GC Explained
vivo Internet Technology
vivo Internet Technology
Apr 24, 2024 · Big Data

Analysis and Resolution of a FileSystem‑Induced Memory Leak Causing OOM in Production

The article details how repeatedly calling FileSystem.get(uri, conf, user) created distinct UserGroupInformation objects, inflating the static FileSystem cache and causing a heap‑memory leak that triggered an Out‑Of‑Memory error, and explains that using the two‑argument get method or explicitly closing instances resolves the issue.

HadoopJavaMemory Leak
0 likes · 13 min read
Analysis and Resolution of a FileSystem‑Induced Memory Leak Causing OOM in Production
Tencent Cloud Developer
Tencent Cloud Developer
Apr 23, 2024 · Backend Development

Performance Optimization of the qs Library: A 5× Speedup Case Study

A Tencent engineer fixed a severe memory‑leak in the qs library’s encode function by processing 30 MB strings in 1024‑character chunks, reducing heap usage from 2.5 GB to 0.48 GB and cutting runtime from 7.9 s to 2.1 s, achieving a five‑fold speedup and memory reduction, and contributed the change as an open‑source pull request.

BenchmarkJavaScriptMemory Leak
0 likes · 10 min read
Performance Optimization of the qs Library: A 5× Speedup Case Study
IT Services Circle
IT Services Circle
Apr 17, 2024 · Databases

Comprehensive Didi Interview Review: Redis Persistence, Data Types, Memory Issues, and System Concepts

This article summarizes a Didi second‑round interview covering Redis persistence mechanisms, data structures, memory overflow and leak concepts, thread safety, process vs thread differences, deadlock prevention, TCP/UDP distinctions, and a couple of hand‑written algorithm problems, providing detailed explanations and code examples.

Data StructuresMemory LeakRedis
0 likes · 19 min read
Comprehensive Didi Interview Review: Redis Persistence, Data Types, Memory Issues, and System Concepts
vivo Internet Technology
vivo Internet Technology
Mar 19, 2024 · Backend Development

Java 8 Memory Management and Garbage Collection Analysis

The article offers a thorough overview of Java 8 memory management, detailing JVM memory regions, object eligibility, major garbage‑collection algorithms and generational models, comparing Serial, Parallel, CMS and G1 collectors, and presenting practical heap‑dump analysis techniques for diagnosing leaks and performance issues.

GC algorithmsHeap AnalysisJVM
0 likes · 29 min read
Java 8 Memory Management and Garbage Collection Analysis
Top Architect
Top Architect
Feb 20, 2024 · Backend Development

JVM Garbage Collection Tuning Experience: Reducing FullGC Frequency and Solving Memory Leaks

Over a month of systematic JVM tuning, the author reduced FullGC frequency from 40 times per day to once every ten days, halved YoungGC time, identified and fixed a memory leak caused by anonymous inner‑class listeners, and documented the step‑by‑step optimization process with configuration changes and performance results.

Garbage CollectionJVMJava
0 likes · 12 min read
JVM Garbage Collection Tuning Experience: Reducing FullGC Frequency and Solving Memory Leaks
Didi Tech
Didi Tech
Nov 21, 2023 · Databases

Investigation and Root Cause Analysis of a Redis Memory Leak in Production

An in‑depth, timeline‑driven investigation of a production Redis memory leak revealed that the custom 3.2.8 build’s getKeysInSlot function failed to free a temporary key‑array after traversing the radix‑tree, causing hundreds of megabytes of leaked SDS strings, which was fixed by adding a single free call and highlighted the need for functional code reviews and early leak detection.

LinuxMemory LeakPerformance
0 likes · 10 min read
Investigation and Root Cause Analysis of a Redis Memory Leak in Production
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.

BackendJavaMemory Leak
0 likes · 6 min read
Analyzing and Reproducing OutOfMemoryError in MyBatis-based Java Services