Detecting and Monitoring Database Deadlocks with EasyBI: A Practical Case Study
This article recounts how a production database deadlock was uncovered during testing, explains the use of the EasyBI monitoring tool to collect and visualize error and claim statistics, and shares the step‑by‑step configuration, analysis, and lessons learned for preventing similar issues in future systems.
In complex software development, hidden database deadlocks can silently threaten system stability; a recent test uncovered such a deadlock, highlighting the importance of thorough testing and proactive monitoring.
Background : The issue was first noticed when production monitoring reported a org.springframework.dao.DeadlockLoserDataAccessException with the message "Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found". The team discussed how to obtain production data safely, leading to the discovery of the EasyBI tool.
EasyBI Overview : EasyBI connects to production databases or APIs, aggregates data into tables, pivot charts, bar/line/radar graphs, and centralizes the results in a monitoring dashboard.
Step 1 – Data Ingestion : Custom interfaces were built to expose abnormal production data, claim counts, and top‑5 claim statistics, then configured in EasyBI.
Step 2 – Application Configuration : The collected data were visualized using aggregated tables, bar charts, and line charts to create a monitoring application.
Step 3 – Subscription Management : Email subscriptions and scheduled tasks were set up to push monitoring results to stakeholders.
Step 4 – Monitoring Data Analysis : Three types of claim statistics were defined – error‑info statistics, weekly success/failure counts, and daily success/failure counts – each displayed via EasyBI tables or charts.
The team encountered timeout issues when querying the claim database directly; the solution was to cache required data in a separate table via scheduled jobs before validation.
The deadlock itself was identified through the error‑info statistics interface, confirming the value of real‑time monitoring.
Reflection and Summary : By setting threshold‑based alerts in EasyBI, the team could detect abnormal data promptly and trigger notifications (e.g., via DingTalk). This enabled rapid identification of upstream system issues, such as unsupported compensation information, and facilitated timely communication with front‑end and business teams.
JD Tech
Official JD technology sharing platform. All the cutting‑edge JD tech, innovative insights, and open‑source solutions you’re looking for, all in one place.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.