This article analyses the root cause of generic "exception" errors during article publishing caused by mismatched MySQL wait_timeout and Druid JDBC pool settings, explains the impact of these parameters, and provides step‑by‑step configuration adjustments and alternative solutions to stabilise the backend database connection pool.
After an AWS network jitter caused lingering slow Redis requests in a Java project using Redisson sentinel, the team traced the issue through source code inspection, custom Prometheus metrics, chaos‑blade testing, and Arthas debugging, ultimately identifying a connection‑pool bug and submitting a fix to Redisson's master branch.
This article walks through a real‑world production incident involving intermittent interface timeouts, demonstrates how tracing with SkyWalking and log analysis revealed a downstream service problem, explores GC log diagnostics, uncovers misconfigured c3p0 connection‑pool settings, and shares practical lessons for Java backend performance tuning.
A detailed analysis shows that reducing the size of a database connection pool can dramatically lower request latency and improve throughput, with real benchmark data from Oracle and PostgreSQL illustrating how CPU, disk, and network constraints dictate the optimal pool size.
The article explains why a small database connection pool often yields better performance than a large one, illustrates the point with Oracle and PostgreSQL benchmark data, and provides a simple formula to calculate the optimal pool size based on CPU cores and effective disks.
This article explains the concept of pooling technology in Java, illustrating its benefits through real‑world analogies, detailing thread pools, memory pools, database connection pools, and HttpClient pools, and provides a performance comparison between raw threads and thread pools using a Java benchmark.
This article examines recurring “connection holder is null” errors in Druid’s connection pool, explains how the holder is assigned and cleared, analyzes two real‑world cases—long‑running transactions and killed connections—and offers practical configuration recommendations to prevent the issue.
This article provides a comprehensive guide to JDBC, covering its definition, core interfaces (Connection, Statement, ResultSet), the advantages of PreparedStatement, the need for connection pools, pagination techniques for Oracle and MySQL, and practical usage of DBUtils with full code examples.
This article explains how to size and tune Druid's connection pool for high‑traffic Java applications, covering pool‑size formulas, timeout settings, keep‑alive behavior, essential XML properties, and version recommendations to prevent misleading SQL latency and improve overall database stability.
Envoy provides active and passive health checks—including HTTP, L3/L4, and Redis types—configurable intervals and failure thresholds, along with a health‑check filter that can bypass, forward, or cache requests, and detailed connection‑pool handling for HTTP/1.1 and HTTP/2 to ensure reliable service routing.
This article describes how a content‑heavy company built a scalable, high‑quality image generation service for its app by leveraging Puppeteer, a custom connection‑pool implementation, CDN caching, launch‑argument tuning, and performance monitoring to achieve low latency and high throughput.
This article explains how to implement request‑ID tagging for each API call in a Java performance‑testing framework, describes the updated MarkRequest implementations, shows how to configure connection‑pool timeouts and retries, and provides full source code examples for both header‑based and string‑based markers.
An engineer recounts how a high‑traffic promotion system suffered port exhaustion and thread‑pool overload due to a default max‑connections‑per‑host setting of two, leading to CPU spikes, process crashes, and a cascading failure, and outlines the investigation steps and preventive measures.
The author describes how a high‑traffic promotion system using HttpClient suffered massive thread and port exhaustion due to misconfigured connection‑pool parameters, details the investigation steps—including monitoring, jstack analysis, and source code review—and outlines corrective measures and preventive testing strategies.
This tutorial walks through creating a lightweight Memcached client in Node.js, covering cluster routing with consistent hashing, low‑level TCP communication, a reusable connection‑pool implementation, and a custom protocol for get operations, complete with practical code examples.
This article investigates the root causes of excessive TCP CLOSE_WAIT connections in a Java service, explains TCP state transitions, demonstrates packet capture analysis, and details how improper use of Apache HttpClient and its connection pool leads to lingering sockets, offering concrete debugging steps and configuration fixes.
An in‑depth guide walks through HikariCP’s seven most useful monitoring metrics, explains their types, shows real‑world examples of connection storms and slow SQL, and provides step‑by‑step troubleshooting methods, code insights, and configuration tips to keep your database connection pool healthy.
This guide shares practical steps to overcome TIME_WAIT port exhaustion on macOS and optimize Apache HttpClient settings for high‑concurrency load testing, including sysctl tweaks for maximum file descriptors, port range adjustments, connection‑pool parameters, timeout configurations, and a custom connection‑recycling thread, enabling over 20 k concurrent requests without bottlenecks.
This article examines Druid 1.1.5 connection‑pool settings—maxWait, connectionProperties, keepAlive, maxActive—illustrates real‑world cases of misconfiguration, provides recommended values, and shares a step‑by‑step investigation of a DB slow‑query incident to help engineers prevent performance and stability issues.
This article analyzes a production Java service that repeatedly hit org.apache.http.conn.ConnectionPoolTimeoutException due to exhausted HttpClient connection pools, explains how CLOSE_WAIT sockets are created when responses are not closed, and provides step‑by‑step code fixes and Tomcat configuration tweaks to eliminate the problem.
This article explains the concept, design considerations, and step‑by‑step implementation of a lightweight database connection pool in Java, covering its core components, thread‑safe management, configuration handling, and a test demonstration of its functionality.
This article explains how to correctly configure JedisPool and its underlying GenericObjectPoolConfig, provides Maven dependency details, demonstrates pool initialization and usage patterns, and offers practical recommendations for maxTotal, maxIdle, minIdle, idle monitoring, and warm‑up to ensure stable and efficient Redis operations in Java applications.
This article explains why creating a database connection for each request is inefficient, introduces the concept and configuration of connection pools, provides a custom Java DataSource implementation, and demonstrates the use of popular open‑source pools such as DBCP, C3P0, and Tomcat JNDI with complete code examples.
The team rescued a crashing Redis cache handling 100K‑120K QPS by shrinking Nginx Lua timeouts, trimming connection pools, adding four Redis nodes behind Twemproxy, and splitting keys to raise cardinality, which eliminated connection spikes, balanced shard load, and restored stable performance.
This guide explains Druid’s key features—including a high‑performance connection pool, SQL monitoring, password encryption, and customizable JDBC filters—and provides step‑by‑step instructions for configuring the pool, creating a custom DruidPasswordCallback, generating RSA keys, encrypting passwords, and integrating the setup into Spring.
The article examines how various JDBC connection pools such as Tomcat‑JDBC, Druid, c3p0, HikariCP, and BoneCP handle connection validation parameters like testOnBorrow, validationInterval, and idle checks, and provides recommendations for critical applications.
This article explains how Tomcat JDBC connection pool settings such as testOnBorrow, testOnReturn, testWhileIdle, and testOnConnect work, discusses related parameters like maxActive and removeAbandoned, and presents performance testing to guide reliable and efficient database connection management.
This guide outlines practical MySQL optimization strategies—including table schema design, index creation, SQL tuning, connection‑pool configuration, and historical data archiving—to help developers maintain fast, scalable databases as data volume grows.
A developer recounts how a Redis connection pool overflow across dozens of clusters was traced to a single misbehaving service, diagnosed with netstat and ps commands, and resolved by adjusting configuration and stopping the offending process, illustrating practical troubleshooting of connection limits.
This article presents practical MySQL optimization techniques covering table schema design, character set choices, primary key strategies, field definitions, index creation, SQL query tuning, pagination tricks, join handling, connection‑pool parameter tuning, and historical data archiving for large‑scale databases.
Heroku shares five practical Redis recommendations—including using connection pools, naming clients, selecting key eviction policies, avoiding the KEYS command, and configuring connection timeouts—to improve performance, manage resources, and simplify troubleshooting in production environments.
This article explains why cache and database can become inconsistent in distributed systems, why the "invalidate‑cache‑then‑write‑DB" rule is preferred, and presents practical serialization techniques—modifying DB and service connection pools—to guarantee per‑key sequential execution while maintaining availability and load balance.
This article explains how to create an asynchronous MySQL proxy server using the Swoole extension, detailing connection pooling, idle/busy management, request queuing, and providing a complete PHP implementation that reduces MySQL load and network overhead for PHP applications.