LLM WikiAccess-protected knowledge portal

WIKI

Infra — GatheringDB Incident & DB Update Monitoring

AI Summary Purpose Capture two durable infra learnings the gatherdb01 memory exhaustion/swap incident and its root cause + fix , and the ELK based DB Update Monitoring system that watches binlog shipping and alerts via JIRA/KakaoWork. Key p

경로ai/wiki/projects/infra-db-monitoring.md
카테고리Project
태그#binlog #cicd #grafana #infra #kubernetes #monitoring #mysql #project #projects #study #wiki

# Infra — GatheringDB Incident & DB Update Monitoring

AI Summary

Purpose:

incident (and its root cause + fix), and the ELK-based DB Update Monitoring system that watches binlog shipping and alerts via JIRA/KakaoWork.

Key points:

hit 99.96% memory and 14GB swap with disk thrashing.

was 89% of the 96GB container limit, leaving ~11GB for OS + MySQL + 512 connections; innodb_dedicated_server=1 auto-tuned against the 125GB HOST RAM (not the 96GB Docker limit), conflicting with manual settings.

and size the buffer pool to ~75% of the CONTAINER limit (here 96GB → 72GB = 77309411328). Swap is a band-aid; right-sizing the buffer pool is the real fix.

create-binlog-index + Filebeat → Logstash 12-pipeline + Elasticsearch → Kibana/Grafana → elk-jira-kakao alerting), run per instance (other, filecomp), to monitor binlog/access-log driven DB update progress and alert on delays.

Relevant when:

binlog/update monitoring and its alerting.

Do not read full document unless:

Linked documents:

Open Questions

Needs confirmation.

Details

gatherdb01 memory/swap incident (ITS-2025-11-26-001)

in use, very high BLOCK I/O (disk thrashing). Risk of master OOM-kill / replica lag.

1. Buffer pool too large vs container limit: innodb_buffer_pool_size 91268055040 (~85GB) = 89% of the 96G compose memory limit; max_connections 512. Insufficient headroom for OS/process/connections → swap. 2. innodb_dedicated_server=1 in a Docker container: it auto-sizes against host RAM (125GB), not the 96GB container limit, misjudging capacity and conflicting with manual config.

/data/product/data-infra/gatheringdb/master/conf/mysql.cnf): - Comment out / remove innodb_dedicated_server=1. - Set innodb_buffer_pool_size=77309411328 (~72GB ≈ 75% of 96GB). - Expected: ~24GB headroom freed, swap eliminated, swap-alert mail stops, master load drops and replica transfer normalizes.

container, and keep the buffer pool at ~75% of the container limit (not the host).

DB Update Monitoring system (db-update-monitoring)

Nginx access logs, then alert on delays.

1. Sources (RSYNC): binlog files from dist-r (172.30.1.202, hourly :10) and dist-m (211.115.125.164, hourly :05); access log + allowed-IP list from 172.30.1.41 every 5 min. Managed separately per instance (other, filecomp). 2. Collect: create-binlog-index scans the binlog dir and emits binlog.json (file_name, created_date, file_size); container restarted hourly at :07. Filebeat ships binlog.json + access log over Beats with SSL/TLS. 3. Process: Logstash runs 12 pipelines (initial → intermediate → final indexes) reading/writing Elasticsearch (ES 8GB/4cpu, Logstash 4GB/4cpu). Final index final_update_index is the main source for dashboards/alerts. 4. Visualize: Kibana (ad-hoc) + Grafana (db_update_monitoring.json dashboard). 5. Alert: elk-jira-kakao polls ES and raises JIRA issues (Epic→Story→Subtask) and KakaoWork messages. Modes: warning (hourly except 9:00), resolve (9:00 only). Categories: file_delay_count (≥24 delayed files), file_update_time (predicted completion ≥24h), file_created_date (binlog creation delay ≥24h).

pipelines for other vs filecomp (e.g. binlog_index_other, binlog_index_filecomp). All inter-service traffic is SSL/TLS; monitoring network 172.28.0.0/16.

연결 문서