Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save lcatlett/b40de731db98f72b14d9567f94214cff to your computer and use it in GitHub Desktop.

Select an option

Save lcatlett/b40de731db98f72b14d9567f94214cff to your computer and use it in GitHub Desktop.
Pantheon Binding Audit Report - Site: a6c2dd42-2ad2-435d-abc0-2a518f16ec8a (test) - 2025-07-22 08:32:54
{
"audit_metadata": {
"timestamp": "2025-07-22T12:32:52Z",
"binding_id": "47ff1666671e4e5996532236bfb18577",
"audit_version": "1.0",
"cache_directory": "./binding_cache/a6c2dd42-2ad2-435d-abc0-2a518f16ec8a/test/47ff1666671e4e5996532236bfb18577",
"date_range": {
"start_date": "2025-07-21",
"end_date": "2025-07-22",
"duration_days": 2,
"filter_type": "last_n_days"
}
},
"binding_metadata": {
"site_name": "holly-hunt",
"site_id": "a6c2dd42-2ad2-435d-abc0-2a518f16ec8a",
"environment": "test",
"plan_name": "Elite",
"service_level": "elite_1m",
"framework": "drupal8",
"php_version": "82",
"appserver_count": 1,
"endpoint": "437a3d0c-eb05-4e9a-ac8d-c528c70a1fa7"
},
"plan_tier_analysis": {
"detected_tier": "Elite",
"worker_range": "4-8",
"error_rate_targets": {
"warning_threshold": 2.0,
"critical_threshold": 5.0
},
"performance_targets": {
"p95_target_seconds": 10.0,
"worker_efficiency_target": 1.0,
"socket_availability_target": 99.0
}
},
"current_usage": {
"php_processes": 0,
"binding_php_processes": 0,
"nginx_processes": 0,
"total_processes": 0,
"memory_usage_mb": 0,
"memory_usage_percent": 0.0,
"cpu_cores": 1,
"load_average": "0.0",
"load_per_core": 0.00,
"old_workers": 6,
"stuck_workers": 0,
"worker_efficiency": 0.0,
"overall_health_score": 0,
"health_status": "DEGRADED",
"uptime_seconds": 86400
},
"resource_exhaustion": {
"overall_status": "OK",
"exhaustion_score": 0,
"cpu_status": "OK",
"memory_status": "OK",
"php_status": "OK",
"efficiency_status": "OK",
"php_process_multiplier": 1.0,
"expected_workers": 8,
"indicators": [],
"analysis_approach": "enhanced_diagnostic"
},
"resource_limits": {
"php_memory_limit_mb": "1024M",
"mysql_memory_limit_mb": "unknown",
"redis_memory_limit_mb": "unknown"
},
"configuration": {
"php_fpm": {
"pm_mode": "ondemand",
"max_children": 8,
"start_servers": 1,
"min_spare_servers": 1,
"max_spare_servers": 5,
"max_requests": 100,
"request_terminate_timeout": 120
},
"php_memory_limit": "1024M",
"nginx": {
"worker_processes": 4,
"worker_connections": 128,
"max_connections": 1024,
"connection_utilization_percent": 0.0
},
"issues": [
]
},
"error_analysis": {
"today": {
"requests": 3033,
"499_errors": 0,
"502_errors": 0,
"503_errors": 0,
"504_errors": 0,
"error_rate_percent": 0
},
"last_7_days": {
"requests": 3033,
"499_errors": 0,
"502_errors": 0,
"503_errors": 0,
"504_errors": 0,
"error_rate_percent": 0
},
"timeout_patterns": {
"30s_timeouts": 0,
"59s_timeouts": 0,
"120s_timeouts": 0,
"long_requests_today": 0
}
},
"socket_exhaustion": {
"nginx_socket_errors_today": 0,
"nginx_socket_errors_week": 0,
"phpfpm_exhaustion_today": 0,
"phpfpm_exhaustion_week": 0,
"max_children_hits": 0,
"worker_scaling_events": 0,
"connection_refused_errors": 0,
"upstream_timeout_errors": 0,
"php_process_kills": 0,
"severity": "OK"
},
"performance_metrics": {
"response_times": {
"p50_seconds": 0,
"p95_seconds": 327002,
"p99_seconds": 0
},
"throughput": {
"requests_per_minute": 2,
"worker_efficiency": 0.0
},
"severity": "OK"
},
"slow_endpoints": [],
"worker_analysis": {
"total_workers": 8,
"old_workers": 6,
"stuck_workers": 0,
"efficiency_percent": 2.5
},
"cascade_analysis": {
"avg_499_response_time": 0.00,
"long_running_requests": 455,
"url_patterns": [],
"cascade_indicators": [
" 455 slow requests >10s (cascade triggers)",
"6 old workers + 50 recent 499s = worker waste pattern",
"57 user 499s > 0 bot 499s = real user impact"
],
"severity": "CRITICAL"
},
"cascade_analysis_enhanced": {
"total_499s": 50,
"user_499s": 57,
"bot_499s": 0,
"avg_499_response_time": 0.00,
"long_running_requests": 455,
"worker_waste_percent": 0,
"response_distribution": "204:521 302:339 200:108 499:24 404:8 ",
"cascade_stats": "Count: 50, Min: 0s, Max: 0s, Avg: 0.00s",
"slow_urls": "/products/shades/quick-ship(327180.0s) /products/wallcovering/performance(327006.0s) /products/wallcovering(326945.0s) ",
"top_499_urls": "/cron/K9t42810a80Y2gRjtHY8sqVC34erQzUmXAApi7ea1TOOLPdzMRenvBZJyJLpH2kSawLycDeO2g(57) ",
"top_499_user_agents": "Mozilla/5.0(57) ",
"cascade_indicators": [" 455 slow requests >10s (cascade triggers)","6 old workers + 50 recent 499s = worker waste pattern","57 user 499s > 0 bot 499s = real user impact"],
"severity": "CRITICAL",
"analysis_approach": "working_diagnostic"
},
"user_agent_analysis": {
"bot_499s": 0,
"user_499s": 57,
"bot_user_agents": ""
},
"log_inventory": {
"nginx_access_logs": 61,
"nginx_error_logs": 1,
"php_logs": 5,
"total_log_size_mb": 29
},
"health_checks": {
"status": "UNKNOWN",
"alerts": [
],
"warnings": [
]
},
"memory_validation": {
"status": "UNKNOWN",
"safety_factor": 0,
"headroom_percent": 0,
"recommendations": [
]
},
"worker_scaling": {
"current_workers": 8,
"optimal_workers": 0,
"scaling_algorithm": "dynamic",
"plan_based_range": "8-16"
},
"recommendations": [
"CRITICAL: 499 cascade pattern detected",
"ACTION: Implement request_terminate_timeout and optimize long-running operations"
]
}
{
"audit_metadata": {
"timestamp": "2025-07-22T12:32:50Z",
"binding_id": "757d881c350d4e11a9a99579f5b22c1c",
"audit_version": "1.0",
"cache_directory": "./binding_cache/a6c2dd42-2ad2-435d-abc0-2a518f16ec8a/test/757d881c350d4e11a9a99579f5b22c1c",
"date_range": {
"start_date": "2025-07-21",
"end_date": "2025-07-22",
"duration_days": 2,
"filter_type": "last_n_days"
}
},
"binding_metadata": {
"site_name": "holly-hunt",
"site_id": "a6c2dd42-2ad2-435d-abc0-2a518f16ec8a",
"environment": "test",
"plan_name": "Elite",
"service_level": "elite_1m",
"framework": "drupal8",
"php_version": "82",
"appserver_count": 1,
"endpoint": "d00ef372-a5e6-4ac6-a62e-45bb5125497a"
},
"plan_tier_analysis": {
"detected_tier": "Elite",
"worker_range": "4-8",
"error_rate_targets": {
"warning_threshold": 2.0,
"critical_threshold": 5.0
},
"performance_targets": {
"p95_target_seconds": 10.0,
"worker_efficiency_target": 1.0,
"socket_availability_target": 99.0
}
},
"current_usage": {
"php_processes": 0,
"binding_php_processes": 0,
"nginx_processes": 0,
"total_processes": 0,
"memory_usage_mb": 0,
"memory_usage_percent": 0.0,
"cpu_cores": 1,
"load_average": "0.0",
"load_per_core": 0.00,
"old_workers": 6,
"stuck_workers": 0,
"worker_efficiency": 0.0,
"overall_health_score": 0,
"health_status": "UNHEALTHY",
"uptime_seconds": 86400
},
"resource_exhaustion": {
"overall_status": "OK",
"exhaustion_score": 0,
"cpu_status": "OK",
"memory_status": "OK",
"php_status": "OK",
"efficiency_status": "OK",
"php_process_multiplier": 1.0,
"expected_workers": 8,
"indicators": [],
"analysis_approach": "enhanced_diagnostic"
},
"resource_limits": {
"php_memory_limit_mb": "1024M",
"mysql_memory_limit_mb": "unknown",
"redis_memory_limit_mb": "unknown"
},
"configuration": {
"php_fpm": {
"pm_mode": "ondemand",
"max_children": 8,
"start_servers": 1,
"min_spare_servers": 1,
"max_spare_servers": 5,
"max_requests": 100,
"request_terminate_timeout": 120
},
"php_memory_limit": "1024M",
"nginx": {
"worker_processes": 4,
"worker_connections": 128,
"max_connections": 1024,
"connection_utilization_percent": 0.0
},
"issues": [
]
},
"error_analysis": {
"today": {
"requests": 4088,
"499_errors": 0,
"502_errors": 0,
"503_errors": 0,
"504_errors": 0,
"error_rate_percent": 0
},
"last_7_days": {
"requests": 4098,
"499_errors": 0,
"502_errors": 0,
"503_errors": 0,
"504_errors": 0,
"error_rate_percent": 0
},
"timeout_patterns": {
"30s_timeouts": 0,
"59s_timeouts": 0,
"120s_timeouts": 0,
"long_requests_today": 0
}
},
"socket_exhaustion": {
"nginx_socket_errors_today": 0,
"nginx_socket_errors_week": 0,
"phpfpm_exhaustion_today": 0,
"phpfpm_exhaustion_week": 0,
"max_children_hits": 0,
"worker_scaling_events": 0,
"connection_refused_errors": 0,
"upstream_timeout_errors": 0,
"php_process_kills": 0,
"severity": "OK"
},
"performance_metrics": {
"response_times": {
"p50_seconds": 0,
"p95_seconds": 327012,
"p99_seconds": 0
},
"throughput": {
"requests_per_minute": 3,
"worker_efficiency": 0.0
},
"severity": "OK"
},
"slow_endpoints": [],
"worker_analysis": {
"total_workers": 8,
"old_workers": 6,
"stuck_workers": 0,
"efficiency_percent": 3.8
},
"cascade_analysis": {
"avg_499_response_time": 0.00,
"long_running_requests": 458,
"url_patterns": [],
"cascade_indicators": [
" 458 slow requests >10s (cascade triggers)",
"6 old workers + 50 recent 499s = worker waste pattern",
"84 user 499s > 0 bot 499s = real user impact"
],
"severity": "CRITICAL"
},
"cascade_analysis_enhanced": {
"total_499s": 50,
"user_499s": 84,
"bot_499s": 0,
"avg_499_response_time": 0.00,
"long_running_requests": 458,
"worker_waste_percent": 0,
"response_distribution": "204:524 302:334 200:118 499:18 404:5 ",
"cascade_stats": "Count: 50, Min: 0s, Max: 0s, Avg: 0.00s",
"slow_urls": "/products/shades/quick-ship(327180.0s) /products/shades/quick-ship(327180.0s) /products/wallcovering/performance(327006.0s) ",
"top_499_urls": "/cron/K9t42810a80Y2gRjtHY8sqVC34erQzUmXAApi7ea1TOOLPdzMRenvBZJyJLpH2kSawLycDeO2g(84) ",
"top_499_user_agents": "Mozilla/5.0(84) ",
"cascade_indicators": [" 458 slow requests >10s (cascade triggers)","6 old workers + 50 recent 499s = worker waste pattern","84 user 499s > 0 bot 499s = real user impact"],
"severity": "CRITICAL",
"analysis_approach": "working_diagnostic"
},
"user_agent_analysis": {
"bot_499s": 0,
"user_499s": 84,
"bot_user_agents": ""
},
"log_inventory": {
"nginx_access_logs": 6,
"nginx_error_logs": 1,
"php_logs": 2,
"total_log_size_mb": 8
},
"health_checks": {
"status": "UNKNOWN",
"alerts": [
],
"warnings": [
]
},
"memory_validation": {
"status": "UNKNOWN",
"safety_factor": 0,
"headroom_percent": 0,
"recommendations": [
]
},
"worker_scaling": {
"current_workers": 8,
"optimal_workers": 0,
"scaling_algorithm": "dynamic",
"plan_based_range": "8-16"
},
"recommendations": [
"CRITICAL: 499 cascade pattern detected",
"ACTION: Implement request_terminate_timeout and optimize long-running operations"
]
}
{
"recommendations_metadata": {
"timestamp": "2025-07-22T12:32:53Z",
"site_id": "a6c2dd42-2ad2-435d-abc0-2a518f16ec8a",
"environment": "test",
"total_bindings_analyzed": 2,
"bindings_with_recommendations": 2
},
"summary": {
"critical_actions_count": 2,
"warning_actions_count": 2,
"optimization_opportunities_count": 0,
"affected_bindings_count": 2
},
"critical_actions": [
"CRITICAL: 499 cascade pattern detected",
"CRITICAL: 499 cascade pattern detected"
],
"warning_actions": [
"ACTION: Implement request_terminate_timeout and optimize long-running operations",
"ACTION: Implement request_terminate_timeout and optimize long-running operations"
],
"optimization_opportunities": [
],
"affected_bindings": [
"47ff1666671e4e5996532236bfb18577",
"757d881c350d4e11a9a99579f5b22c1c"
]
}
{
"summary_metadata": {
"timestamp": "2025-07-22T12:32:53Z",
"site_id": "a6c2dd42-2ad2-435d-abc0-2a518f16ec8a",
"environment": "test",
"binding_count": 2,
"audit_version": "1.0"
},
"site_overview": {
"site_name": "holly-hunt",
"plan_name": "Elite",
"service_level": "elite_1m",
"total_bindings": 2,
"overall_severity": "CRITICAL"
},
"aggregated_metrics": {
"total_requests_today": 7121,
"total_requests_week": 7131,
"total_499_errors_today": 0,
"total_499_errors_week": 0,
"total_502_errors_today": 0,
"total_502_errors_week": 0,
"overall_error_rate_today_percent": 0.00,
"overall_error_rate_percent": 0.00
},
"binding_health": {
"critical_bindings": 2,
"warning_bindings": 0,
"healthy_bindings": 0,
"health_distribution_percent": {
"critical": 100.0,
"warning": 0.0,
"healthy": 0.0
}
},
"binding_reports": [
{"binding_id": "47ff1666671e4e5996532236bfb18577", "report_file": "binding_47ff1666671e4e5996532236bfb18577.json"},
{"binding_id": "757d881c350d4e11a9a99579f5b22c1c", "report_file": "binding_757d881c350d4e11a9a99579f5b22c1c.json"}
]
}

Pantheon Binding Tool - Comprehensive Report

Executive Summary

  • Site Name: holly-hunt
  • Site ID: a6c2dd42-2ad2-435d-abc0-2a518f16ec8a
  • Plan: Elite
  • Total Bindings: 2
  • Overall Status: CRITICAL
  • Audit Date: Tue Jul 22 08:32:53 EDT 2025

Performance Overview (Last 7 Days)

  • Total Requests: 7,131
  • 499 Errors (Client Disconnects): 0
  • 502 Errors (Bad Gateway): 0
  • Overall Error Rate: 0.00%

Binding Health Summary

  • 🔴 Critical Issues: 2 bindings
  • 🟡 Warning Issues: 0 bindings
  • 🟢 Healthy: 0 bindings

Technical Details

Audit Methodology:

  • Log analysis covers last 7 days of nginx access/error logs
  • Configuration analysis of PHP-FPM, nginx, and Redis settings
  • Performance metrics extracted from current and historical log files
  • Error rate calculations based on total requests vs error responses

Key Metrics Explained:

  • 499 Errors: Client disconnected before server response
  • 502 Errors: Bad gateway errors
  • Socket Errors: Resource exhaustion at nginx level
  • PHP-FPM Pool Exhaustion: All PHP workers busy, requests queued/dropped

Thresholds:

  • Critical: Error rate > 5% OR > 1000 errors/day
  • Warning: Error rate > 1% OR > 100 errors/day
  • Healthy: Error rate < 1% AND < 100 errors/day

Next Steps

  1. Immediate Actions:

    • Review critical recommendations above
    • Implement fixes for high-priority items
    • Monitor error rates closely
  2. Scheduled Improvements:

    • Address warning-level issues during maintenance windows
    • Implement optimization recommendations
    • Update monitoring and alerting
  3. Follow-up:

    • Re-run audit after 24-48 hours to verify improvements
    • Set up regular auditing schedule
    • Review trends over time for capacity planning

Report Files

  • Site Summary: site_summary.json - Machine-readable aggregate data
  • Recommendations: recommendations.json - Detailed actionable items
  • Individual Bindings: bindings/binding_*.json - Per-binding detailed analysis

Generated: Tue Jul 22 08:32:53 EDT 2025 Audit Tool: Pantheon Binding Tool v1.0 Data Source: Last 7 days of log files and current configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment