The Memory Monitoring Dashboard provides real-time visualization of worker pool performance metrics during CSV normalization processing. It helps monitor system health, identify performance bottlenecks, and debug processing issues.
Access: Navigate to /monitoring or click the "Monitoring" button in the main header.
Displays overall worker pool status with color-coded badges:
- HEALTHY (Green) - Workers active, memory usage normal, low retry rate
- IDLE (Blue) - No active processing
- WARNING (Yellow) - High memory usage or excessive retries
- UNKNOWN (Gray) - Unable to determine status
Health Criteria:
- Active workers > 0
- Average memory per worker < 500 MB
- Total retries < 10
Four key metrics displayed at the top of the dashboard:
- Number of Web Workers currently processing chunks
- Updates every 2 seconds when auto-refresh enabled
- Combined memory usage across all active workers (MB)
- Includes RSS (Resident Set Size)
- Total number of chunks processed since workers started
- Each chunk typically contains 1,000-2,000 rows
- Number of chunk retries due to transient failures
- High retry count may indicate system issues
Type: Line chart
Update Frequency: Every 5 seconds
Time Range: Configurable (5min, 15min, 30min, 1hr)
Shows the number of active workers processing chunks over time. Useful for:
- Identifying worker pool scaling patterns
- Detecting worker crashes or recycling events
- Monitoring parallel processing efficiency
Expected Pattern:
- Ramps up quickly when processing starts
- Stays constant during active processing
- Drops to zero when processing completes
Type: Area chart
Update Frequency: Every 5 seconds
Time Range: Configurable (5min, 15min, 30min, 1hr)
Displays total memory consumption (MB) across all workers. Useful for:
- Detecting memory leaks
- Monitoring memory growth patterns
- Verifying worker recycling effectiveness
Expected Pattern:
- Gradual increase as workers process chunks
- Periodic drops when workers are recycled (after 100 chunks)
- Should not exceed 500 MB per worker
Warning Signs:
- Continuous upward trend without drops (memory leak)
- Sudden spikes (inefficient chunk processing)
- Exceeding 500 MB per worker (may trigger recycling)
Tab: Recycling Events
Update Frequency: Every 5 seconds
Limit: Last 20 events
Displays recent worker recycling activity with details:
| Column | Description |
|---|---|
| Time | When the worker was recycled |
| Worker ID | Unique identifier (first 8 characters) |
| Reason | Why the worker was recycled |
| Chunks | Number of chunks processed before recycling |
| Memory (MB) | Memory usage at time of recycling |
Recycling Reasons:
max_chunks- Worker processed 100 chunks (normal)memory_limit- Worker exceeded 500 MB memory (normal)error- Worker crashed or encountered fatal error (investigate)manual- Manually triggered recycling (rare)
Normal Pattern:
- Most recyclings should be
max_chunksafter exactly 100 chunks - Occasional
memory_limitrecyclings are acceptable - Frequent
errorrecyclings indicate bugs
Tab: Retry Events
Update Frequency: Every 5 seconds
Limit: Last 20 events
Displays recent chunk processing retries with details:
| Column | Description |
|---|---|
| Time | When the retry occurred |
| Chunk ID | Identifier of the chunk being retried |
| Attempt | Retry attempt number (1-3) |
| Error | Error message that triggered retry |
| Delay | Delay before retry (exponential backoff) |
Retry Logic:
- Max Retries: 3 attempts per chunk
- Backoff: 1s → 2s → 4s → 8s (exponential)
- Max Delay: 30 seconds
Normal Pattern:
- Occasional retries (< 1% of chunks) due to transient errors
- Retry attempts should succeed on 2nd or 3rd attempt
- Delays should follow exponential backoff pattern
Warning Signs:
- High retry rate (> 5% of chunks)
- Many chunks reaching 3rd attempt
- Same error message repeating frequently
Location: Top-right header
States: ON (blue) / OFF (gray)
When enabled:
- Current metrics refresh every 2 seconds
- Historical charts refresh every 5 seconds
- Event tables refresh every 5 seconds
When disabled:
- All data remains static
- Manual refresh button still works
Use Cases:
- Enable during active processing to monitor in real-time
- Disable to freeze data for analysis or screenshots
Location: Top-right header
Options: 5 minutes, 15 minutes, 30 minutes, 1 hour
Controls the time window displayed in charts:
- 5 minutes - High-resolution view for debugging
- 15 minutes - Medium-term processing monitoring
- 30 minutes - Long-running job overview
- 1 hour - Full historical view (max retention)
Note: Metrics older than 1 hour are automatically cleaned up.
Location: Top-right header (refresh icon)
Immediately fetches latest metrics without waiting for auto-refresh interval.
Use Cases:
- Quick status check when auto-refresh is disabled
- Force update after suspected data staleness
The dashboard uses the following tRPC endpoints:
Returns current system snapshot:
{
timestamp: number;
activeWorkers: number;
totalMemoryMB: number;
avgMemoryPerWorkerMB: number;
totalChunksProcessed: number;
totalRetries: number;
totalRecyclings: number;
}Returns time-series data for charts:
{
durationMs: number; // 1 min to 1 hour
}
// Returns: SystemMetricsSnapshot[]Returns recent worker recycling events:
{
limit: number; // 1-100, default 50
}
// Returns: WorkerRecyclingEvent[]Returns recent chunk retry events:
{
limit: number; // 1-100, default 50
}
// Returns: ChunkRetryEvent[]Metrics are collected by the MemoryMetricsCollector service:
Storage: In-memory with 1-hour retention
Cleanup: Automatic every 5 minutes
Overhead: Minimal (< 1% performance impact)
Data Collected:
- Worker memory usage (RSS, heap used, heap total, external)
- Worker recycling events (timestamp, reason, chunks processed)
- Chunk retry events (timestamp, attempt number, error, delay)
- System snapshots (active workers, total memory, chunks processed)
Cause: No active processing or metrics collection not started
Solution: Process a CSV file to generate metrics
Cause: Auto-refresh disabled or browser tab inactive
Solution: Enable auto-refresh or click manual refresh button
Possible Causes:
- Network issues (if using remote APIs)
- Memory pressure on client machine
- Bugs in normalization code
Investigation:
- Check retry events table for error messages
- Look for patterns in chunk IDs (specific data causing issues?)
- Monitor memory usage chart for spikes
Possible Causes:
- Memory leaks in worker code
- Large chunks exceeding memory limits
- Inefficient normalization logic
Investigation:
- Check recycling events table for reasons
- Monitor memory usage chart for growth patterns
- Reduce chunk size if memory limit recyclings are common
Possible Causes:
- No active processing
- Workers crashed during initialization
- Browser Web Worker API disabled
Investigation:
- Check browser console for worker errors
- Verify Web Workers are supported (modern browsers only)
- Try processing a small CSV file to trigger workers
For Large Files (100k+ rows):
- Worker Pool Size: 4-8 (match CPU cores)
- Chunk Size: 2,000 rows
- Max Concurrent Chunks: 8
- Auto-Refresh: ON
- Time Range: 30 minutes or 1 hour
For Small Files (< 10k rows):
- Worker Pool Size: 2-4
- Chunk Size: 1,000 rows
- Max Concurrent Chunks: 4
- Auto-Refresh: ON
- Time Range: 5 or 15 minutes
Per Worker:
- Target: < 200 MB
- Warning: 300-500 MB
- Recycle: > 500 MB
Total System:
- 4 workers × 500 MB = 2 GB max
- Add 500 MB for browser overhead
- Recommended: 4 GB+ RAM for smooth operation
Planned features for future versions:
- Export Metrics - Download metrics as CSV/JSON
- Alerts - Configurable alerts for high memory, retry rate
- Historical Comparison - Compare current vs previous runs
- Worker Details - Per-worker memory breakdown
- Custom Time Ranges - User-defined time windows
- Metric Persistence - Store metrics in database for long-term analysis
| Version | Changes |
|---|---|
| v3.19.0 | Initial release with real-time monitoring dashboard |
- VERSION_HISTORY.md - Full version history
- INFRASTRUCTURE_FIXES_v3.17.0.md - Error recovery and memory leak fixes
- README.md - Project overview and setup