Skip to main content

Overview

This guide covers advanced debugging techniques for troubleshooting complex issues with Smallest Self-Host.

Debugging Tools

Docker Debugging

Enter Running Container

Inside the container:

Debug Failed Container

View logs of crashed container:
Inspect container configuration:

Network Debugging

Check container networking:

Kubernetes Debugging

Debug Pod

Interactive debug container:
Copy debug tools into pod:

Ephemeral Debug Container

Add temporary container to running pod:
Inside debug container:

Get Previous Logs

If pod crashed and restarted:

Network Debugging

Test Service Connectivity

From inside cluster:
Inside debug pod:

DNS Resolution

Check DNS is working:
Check CoreDNS logs:

Network Policies

List network policies:
Temporarily disable for testing:
Remember to recreate network policies after testing!

Performance Debugging

Resource Usage

Check pod resource consumption:
Check node resource usage:

GPU Debugging

Check GPU availability in pod:
Watch GPU utilization:
Check GPU events:

Application Profiling

Profile Lightning ASR:
Memory profiling:

Log Analysis

Structured Log Parsing

Extract errors from logs:
Count errors:
Show errors with context:

Log Aggregation

Combine logs from all replicas:
Follow logs from multiple pods:

Parse JSON Logs

Using jq:

Database Debugging

Redis Debugging

Connect to Redis:
Inside Redis CLI:
Check Redis memory:
Check slow queries:

API Debugging

Test API Endpoints

Health check:
Test transcription:

Request Tracing

Add request ID tracking:
Grep logs for request:

Packet Capture

Capture network traffic:
Analyze with Wireshark or:

Event Debugging

Watch Events

Real-time events:
Filter by type:
Sort by timestamp:

Event Analysis

Count events by reason:

Metrics Debugging

Check Prometheus Metrics

Port forward Prometheus:
Query metrics: Open http://localhost:9090 and run:

Check Custom Metrics

Verify metrics available to HPA:
Query specific metric:

Debugging Checklists

Startup Issues Checklist

1

Check Image Pull

2

Verify Secrets

3

Check Resources

4

Review Logs

Performance Issues Checklist

1

Check Resource Usage

2

Verify GPU

3

Check HPA

4

Review Metrics

Advanced Techniques

Enable Debug Logging

Increase log verbosity:

Simulate Failures

Test error handling:

Load Testing

Generate load:

Chaos Engineering

Test resilience (requires Chaos Mesh):

What’s Next?

Logs Analysis

Learn to interpret logs and errors

Common Issues

Quick fixes for frequent problems