SShortSingh.
Back to feed

How a Spring @Transactional Misuse Exhausted Database Connections via External I/O

0
·1 views

A production incident traced a Hikari connection pool exhaustion to a Spring @Transactional method that enclosed synchronous calls to external systems like ActiveMQ, Firebase, S3, and SMS. Spring's default event listeners run synchronously on the publishing thread, meaning JDBC connections stayed checked out from the pool during network round-trips to the message broker. When the ActiveMQ broker became unavailable, every write request stalled on the JMS send, preventing transactions from committing and draining the pool entirely. New requests then timed out after 30 seconds, surfacing as SQLTransientConnectionException errors. The root cause was a code pattern where database transaction boundaries incorrectly enclosed calls to external systems that the database had no visibility into.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingHacker News ·

38-Year-Old Shares Personal Struggle With Financial Self-Sufficiency

A 38-year-old individual has published a personal essay on Substack detailing their inability to financially support themselves. The piece, titled 'I'm 38 and I Can't Support Myself Anymore,' was shared on Hacker News where it gained modest traction with 31 points. The post attracted some community discussion, generating a small number of comments on the platform. The essay appears to reflect broader anxieties around financial stability and self-sufficiency that resonate with some readers.

0
ProgrammingDEV Community ·

Dev Tutorial: Building an Orchestrator Agent for Multi-Agent AI LinkedIn Tool

A developer tutorial series on DEV Community details the construction of a multi-agent AI system designed to generate LinkedIn content for companies. Part 2 focuses on the Orchestrator Agent, which acts as a central coordinator — classifying topics, selecting content angles, and passing structured output to downstream agents. The project uses a modular file structure with separate Python files for each agent, alongside shared core utilities for LLM calls and data models. A key challenge encountered was inconsistent JSON output from local language models like Gemma2:2b, which sometimes returned malformed responses despite explicit formatting instructions. To address this, the author wrote a preprocessing function called strip_json_fences() that strips markdown fences, removes trailing commas, and normalises smart quotes before JSON parsing.

0
ProgrammingDEV Community ·

Cisco Ethical Hacker Curriculum Expanded Into Professional Penetration Testing Reference

A detailed, module-by-module reference guide has been developed based on the Cisco Networking Academy Ethical Hacker curriculum, extended to meet mid- and senior-level cybersecurity practitioner standards. The resource covers ten modules ranging from foundational ethical hacking concepts to post-exploitation techniques, cloud security, and professional reporting. It emphasizes that authorization is the single most critical distinction separating a criminal hacker from a legitimate security professional. Key concepts defined include ethical hacking, penetration testing, and vulnerability assessment, with the guide noting that pen testing is a formal, scoped subset of the broader ethical hacking discipline. The reference also addresses legal and procedural foundations, professional frameworks, and guidance on setting up isolated lab environments for safe practice.

0
ProgrammingDEV Community ·

How Treating CI/CD Pipelines as First-Class Code Fixes Common DevOps Failures

A software developer outlines how poor CI/CD practices — such as hard-coded secrets, missing dependency caches, and monolithic pipeline scripts — led to slow feedback loops and unreliable deployments. The core fix proposed is treating pipelines as modular, version-controlled code with clearly defined inputs, outputs, and reusable jobs. Using GitHub Actions as the primary example, the article contrasts a flawed workflow with an improved version that pins action versions, caches dependencies, and protects secrets via environment-scoped variables. The improved pipeline separates build, test, and deploy into distinct jobs linked through artifacts, reducing redundant work and preventing accidental secret exposure in logs. The author notes these principles apply equally across GitHub Actions, GitLab CI, and Jenkins.

How a Spring @Transactional Misuse Exhausted Database Connections via External I/O · ShortSingh