Skip to main content
Kafka Setup with Script Code प्रकाशित: 03 जुलाई 2026 | श्रेणी: DevOps | लेखक: तकनीकी विशेषज्ञ 🌙 Dark Mode Apache Kafka एक शक्तिशाली डेटा स्ट्रीमिंग प्लेटफॉर्म है। यहाँ इसे स्क्रिप्ट कोड के ज़रिए सेटअप करने की पूरी गाइड दी गई है। Twitter LinkedIn WhatsApp चरण 1: सिस्टम जावा अपडेट काफ्का के लिए जावा आवश्यक है, इसे इंस्टॉल करने की स्क्रिप्ट नीचे दी गई है: Copy sudo apt update && sudo apt install default-jdk -y चरण 2: काफ्का डाउनलोड स्क्रिप्ट Copy wget https://apache.org tar -xzf kafka_2.13-3.5.0.tgz cd kafka_2.13-3.5.0 चरण 3: ज़ूकीपर और सर्वर स्टार्ट टर्मिनल 1 में ज़ूकीपर चलाएं: ...

I can help you pinpoint the exact commands or dashboard metrics to diagnose the root cause quickly.

When a production database CPU hits 95%, you need to act fast. Here are the exact terminal commands and infrastructure metrics to check immediately, categorized by the top database engines and monitoring tools:
1. Active Processes & Runaway Queries
Identify and stop the specific query that is consuming all the CPU cycles.
  • PostgreSQL: Run SELECT pid, age(clock_timestamp(), query_start), usename, query FROM pg_stat_activity WHERE state != 'idle' ORDER BY age DESC; to find long-running queries. If a query is stuck, kill it safely using SELECT pg_cancel_backend(pid);.
  • MySQL: Run SHOW FULL PROCESSLIST;. Sort by the Time column. Look for queries stuck in "Sending data" or "Sorting" states. Terminate the rogue process using KILL [process_id];.
  • MongoDB: Run db.currentOp({"active": true, "secs_running": {$gt: 5}}) to list operations running for more than 5 seconds. Terminate them using db.killOp(opId).
2. Traffic Spikes & Connection Counts
Determine if the CPU spike is due to a sudden surge in application workload or connection pooling failures.
  • AWS CloudWatch: Check the DatabaseConnections and NetworkReceiveThroughput metrics. A sudden vertical spike points to an application loop or an external traffic surge.
  • Datadog / New Relic: Look at the Queries Per Second (QPS) or Throughput graph. Compare today's volume with yesterday's baseline to confirm an anomaly.
  • Action: If connection limits are breached, you may need to temporarily scale up your connection pooler (like PgBouncer) or apply rate-limiting on the application side.
3. Resource Contention (Memory & Disk I/O)
Ensure the CPU isn't choking because it is waiting on storage or running out of RAM.
  • Disk I/O Bottleneck: Check ReadIOPS and WriteIOPS in your cloud console. If the database is hitting its maximum IOPS limit, the CPU will get stuck in an iowait state, driving up CPU utilization.
  • Memory Swapping: Use server commands like top or free -m to check Swap Usage. If the OS is actively swapping memory to disk because the database ran out of RAM, CPU performance will instantly collapse.

To help you troubleshoot further or prevent this from happening again, tell me:
  • Which specific database and version are you using?
  • Was there a recent code deployment, automated cron job, or data migration scheduled around the time of the spike?
  • Do you have slow query logging enabled?

Comments

Popular posts from this blog

देवोप्स की पढ़ाई कैसे करें?

 DevOps (डेवऑप्स) एक ऐसा तरीका है जो सॉफ्टवेयर डेवलपमेंट (Dev) और IT ऑपरेशन्स (Ops) को एक साथ लाता है। इसका मुख्य लक्ष्य सॉफ्टवेयर बनाने, टेस्ट करने और डिलीवर करने की प्रक्रिया को तेज और अधिक विश्वसनीय बनाना है। DevOps की पढ़ाई के लिए आप नीचे दिए गए स्टेप्स को फॉलो कर सकते हैं: 1. मूलभूत अवधारणाओं को समझें सबसे पहले, आपको DevOps क्या है, यह क्यों महत्वपूर्ण है, और इसके मुख्य चरण (जैसे कंटीन्यूअस इंटीग्रेशन, कंटीन्यूअस डिलीवरी, मॉनिटरिंग) को समझना होगा। DevOps एजाइल मेथोडोलॉजी (Agile methodology) से बहुत प्रेरित है, इसलिए एजाइल के सिद्धांतों को समझना भी मददगार होगा। 2. आवश्यक स्किल्स और टूल्स सीखें DevOps इंजीनियर बनने के लिए कुछ प्रमुख स्किल्स और टूल्स में महारत हासिल करनी होगी:  * प्रोग्रामिंग स्किल्स (Programming Skills): कम से कम एक स्क्रिप्टिंग भाषा (जैसे Python, Bash, Ruby) का ज्ञान आवश्यक है, क्योंकि ऑटोमेशन में इनका उपयोग होता है। Java, JavaScript, या SQL का ज्ञान भी फायदेमंद हो सकता है।  * Linux/Unix: ऑपरेटिंग सिस्टम (OS) की गहरी समझ, खासकर Linux कमांड-लाइन और फाइ...

What modifications are required in Jenkins after changing the public IP address?

When you change the public IP address of a server running Jenkins , several modifications and checks are required to ensure Jenkins continues to function properly and remains accessible. Here’s a list of key updates you might need to make: 🔧 1. Update Jenkins URL Configuration: Why : Jenkins uses its root URL for things like generating links in email notifications, webhook callbacks, and UI redirects.

How to setup host based routing in eks with ingress controller ?

Of course. To set up host-based routing in EKS, you define an Ingress resource with multiple rules. Each rule specifies a hostname (e.g., app1.example.com) and maps it to a corresponding backend Service. The AWS Load Balancer Controller reads this resource and provisions an Application Load Balancer (ALB) to route traffic based on the Host header of incoming requests. Here’s a complete guide. Prerequisites A running Amazon EKS cluster. kubectl configured to connect to your cluster. The AWS Load Balancer Controller installed in your cluster. This is the standard Ingress controller for EKS. A registered domain name (e.g., your-domain.com) that you can manage. Step 1: Deploy Sample Applications First, let's deploy two different applications to route traffic to: a "coffee" app ☕ and a "tea" app 🍵. Each application will have a Deployment and a Service. Save the following YAML as apps.yaml: # apps.yaml # --- Coffee App --- apiVersion: apps/v1 kind: Deployment metadat...