Tagged articles
7 articles
Page 1 of 1
JD Cloud Developers
JD Cloud Developers
Aug 13, 2025 · Backend Development

Why Do MySQL PhantomReferences Cause Long GC Pauses and How to Fix Them?

This article analyzes frequent timeout alerts caused by the getUiToken API, investigates JVM garbage‑collection pauses linked to excessive PhantomReference objects from MySQL connections, and presents configuration, code, and scheduling solutions that dramatically reduce GC latency and improve service stability.

ConnectionPoolJVMPhantomReference
0 likes · 12 min read
Why Do MySQL PhantomReferences Cause Long GC Pauses and How to Fix Them?
JD Tech Talk
JD Tech Talk
Aug 13, 2025 · Backend Development

Why MySQL getUiToken Times Out: PhantomReference GC Bottleneck & Fix

The article investigates frequent timeout alerts on the getUiToken API, tracing the issue to excessive PhantomReference objects causing long GC pauses, explains how MySQL’s AbandonedConnectionCleanupThread and default Druid pool settings generate these references, and presents configuration tweaks, JVM flags, and cleanup tasks that reduced GC pause times from 1.25 s to 0.1 s.

DruidPhantomReferencegc
0 likes · 11 min read
Why MySQL getUiToken Times Out: PhantomReference GC Bottleneck & Fix
Bin's Tech Cabin
Bin's Tech Cabin
Jun 19, 2024 · Fundamentals

Why PhantomReference Can Track GC While WeakReference Can’t in ZGC

Exploring the differences between PhantomReference and WeakReference in Java’s ZGC, this article explains how ZGC’s concurrent phases and the should_drop method use distinct bitmap bits to determine object liveness, revealing why only PhantomReference reliably tracks object reclamation in certain finalization scenarios.

Garbage CollectionJVMPhantomReference
0 likes · 11 min read
Why PhantomReference Can Track GC While WeakReference Can’t in ZGC
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Aug 12, 2022 · Fundamentals

Mastering Java’s Four Reference Types: Strong, Soft, Weak, and Phantom

Explore Java’s four reference types—strong, soft, weak, and phantom—understanding their behavior, garbage collection interactions, practical code examples, and best-use scenarios, while learning how to manage memory efficiently and avoid pitfalls such as improper finalize() overrides.

Garbage CollectionMemory ManagementPhantomReference
0 likes · 9 min read
Mastering Java’s Four Reference Types: Strong, Soft, Weak, and Phantom
IT Xianyu
IT Xianyu
Nov 5, 2020 · Fundamentals

Four Types of References in Java and Their Usage

This article explains Java's four reference types—strong, soft, weak, and phantom—detailing their purposes, behavior during garbage collection, and practical code examples that demonstrate how each reference influences object lifecycle and memory management.

Garbage CollectionMemory ManagementPhantomReference
0 likes · 9 min read
Four Types of References in Java and Their Usage
Selected Java Interview Questions
Selected Java Interview Questions
Mar 2, 2020 · Fundamentals

Understanding Java Reference Types: SoftReference, WeakReference, and PhantomReference Implementation Details

This article explains Java's four reference types, focusing on the implementation and lifecycle of SoftReference, WeakReference, and PhantomReference, and clarifies how garbage collection policies, native and Java layers, and reference queues determine when these references are cleared or notified.

Garbage CollectionPhantomReferenceSoftReference
0 likes · 14 min read
Understanding Java Reference Types: SoftReference, WeakReference, and PhantomReference Implementation Details