8fc208b0d2
CRITICAL BUG FIX: When peak_concurrent or peak_mem_seen = 0 (no traffic/memory data detected), the recommendation functions were: 1. Calling wrong fallback functions (calculate_optimal_max_requests for max_children) 2. Returning 0 or invalid values instead of safe defaults FIXES: - get_max_children_recommendation(): • When peak_concurrent = 0: return safe minimum of 5 • Fixed incorrect fallback to calculate_optimal_max_requests • Added proper traffic-based fallback calculation - get_memory_limit_recommendation(): • When peak_mem_seen = 0: return safe default of 128M • Ensures memory limits are never recommended as 0 or invalid IMPACT: - Prevents recommending pm.max_children: 0 (which is invalid) - Ensures all recommendations have sensible minimums - Improves analyzer robustness when domains have no recent logs ROOT CAUSE: Incomplete handling of zero-value cases during profile analysis. Safe defaults are essential when usage data is sparse. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>