{"id":5171,"plugin_id":"plugin_asdk_app_6a624c56bfe081918f7544f7d58f6faf","kind":"skill","collection_source":null,"comparison_source":null,"observed_at":"2026-09-30T22:43:20.828Z","digest":"377b1a8f9e1eebea16d062e201a51a69ef19b54e9563a716ffb8b069e44dc061","against":null,"payload":{"name":"render-debug","description":"Debug failed Render deployments by analyzing logs, metrics, and database state. Identifies errors (missing env vars, port binding, OOM, etc.) and suggests fixes. Use when deployments fail, services won't start, or users mention errors, logs, or debugging.","included_files":[{"relative_path":"references/database-debugging.md","size_in_bytes":8964},{"relative_path":"references/error-patterns.md","size_in_bytes":19399},{"relative_path":"references/log-analysis.md","size_in_bytes":10099},{"relative_path":"references/metrics-debugging.md","size_in_bytes":6494},{"relative_path":"references/quick-workflows.md","size_in_bytes":6235},{"relative_path":"references/troubleshooting.md","size_in_bytes":12762}],"skill_md_contents":"---\nname: render-debug\ndescription: Debug failed Render deployments by analyzing logs, metrics, and database state. Identifies errors (missing env vars, port binding, OOM, etc.) and suggests fixes. Use when deployments fail, services won't start, or users mention errors, logs, or debugging.\nlicense: MIT\ncompatibility: Requires Render MCP tools or CLI\nmetadata:\n  author: Render\n  version: \"1.1.0\"\n  category: debugging\n---\n\n# Debug Render Deployments\n\nAnalyze deployment failures using logs, metrics, and database queries. Identify root causes and apply fixes.\n\n## When to Use This Skill\n\nActivate this skill when:\n- Deployment fails on Render\n- Service won't start or keeps crashing\n- User mentions errors, logs, or debugging\n- Health checks are timing out\n- Application errors in production\n- Performance issues (slow responses)\n- Database connection problems\n\n## Prerequisites\n\n**MCP tools (preferred):** Test with `list_services()` - provides structured data\n\n**CLI (fallback):** `render --version` - use if MCP tools unavailable\n\n**Authentication:** If you installed the Render plugin (Cursor, Codex, Claude Code), it provides OAuth for MCP — complete the OAuth prompt. For manual MCP clients, use a Render API key. For CLI, verify with `render whoami -o json`.\n\n**Workspace:** `get_selected_workspace()` or `render workspace current -o json`\n\n> **Note:** MCP tools require the Render MCP server. If unavailable, use the CLI for logs and deploy status; metrics and structured database queries require MCP.\n\n## MCP Setup\n\nIf `list_services()` fails, set up the Render MCP server. For detailed per-tool walkthroughs, see **render-mcp**.\n\n**Plugin setup:** If the Render plugin is installed, complete Render OAuth when prompted, then reload your tool and retry `list_services()`.\n\n**Manual MCP setup:** Add the Render MCP server to your AI tool's MCP config:\n- **URL:** `https://mcp.render.com/mcp`\n- **Auth header:** `Authorization: Bearer <YOUR_API_KEY>`\n- **API key:** `https://dashboard.render.com/u/*/settings#api-keys`\n\nAfter configuring, restart your tool and retry `list_services()`. Then set your workspace with `list_workspaces()` / `get_selected_workspace()`.\n\n---\n\n## Debugging Workflow\n\n### Step 1: Identify Failed Service\n\n```\nlist_services()\n```\n\nIf MCP isn't configured, ask whether to set it up (preferred) or continue with CLI. Then proceed.\n\nLook for services with failed status. Get details:\n\n```\nget_service(serviceId: \"<id>\")\n```\n\n### Step 2: Retrieve Logs\n\n**Build/Deploy Logs (most failures):**\n```\nlist_logs(resource: [\"<service-id>\"], type: [\"build\"], limit: 200)\n```\n\n**Runtime Error Logs:**\n```\nlist_logs(resource: [\"<service-id>\"], level: [\"error\"], limit: 100)\n```\n\n**Search for Specific Errors:**\n```\nlist_logs(resource: [\"<service-id>\"], text: [\"KeyError\", \"ECONNREFUSED\"], limit: 50)\n```\n\n**HTTP Error Logs:**\n```\nlist_logs(resource: [\"<service-id>\"], statusCode: [\"500\", \"502\", \"503\"], limit: 50)\n```\n\n### Step 3: Analyze Error Patterns\n\nMatch log errors against known patterns:\n\n| Error | Log Pattern | Common Fix |\n|-------|-------------|------------|\n| **MISSING_ENV_VAR** | `KeyError`, `not defined` | Add to render.yaml or `update_environment_variables` |\n| **PORT_BINDING** | `EADDRINUSE` | Use `0.0.0.0:$PORT` |\n| **MISSING_DEPENDENCY** | `Cannot find module` | Add to package.json/requirements.txt |\n| **DATABASE_CONNECTION** | `ECONNREFUSED :5432` | Check DATABASE_URL, DB status |\n| **HEALTH_CHECK** | `Health check timeout` | Add /health endpoint, check port binding |\n| **OUT_OF_MEMORY** | `heap out of memory`, exit 137 | Optimize memory or upgrade plan |\n| **BUILD_FAILURE** | `Command failed` | Fix build command or dependencies |\n\nFull error catalog: [references/error-patterns.md](references/error-patterns.md)\n\n**If errors repeat across deploys:** Switch from incremental fixes to a broader sweep. Scan the codebase/config for all likely causes in that error class (related env vars, build config, dependencies, or type errors) and address them together before the next redeploy.\n\n### Step 4: Check Metrics (Performance Issues)\n\nFor crashes, slow responses, or resource issues:\n\n```\nget_metrics(\n  resourceId: \"<service-id>\",\n  metricTypes: [\"cpu_usage\", \"memory_usage\", \"memory_limit\"]\n)\n```\n\n```\nget_metrics(\n  resourceId: \"<service-id>\",\n  metricTypes: [\"http_latency\"],\n  httpLatencyQuantile: 0.95\n)\n```\n\nDetailed metrics guide: [references/metrics-debugging.md](references/metrics-debugging.md)\n\n### Step 5: Debug Database Issues\n\nFor database-related errors:\n\n```\n# Check database status\nlist_postgres_instances()\n\n# Check connections\nget_metrics(resourceId: \"<postgres-id>\", metricTypes: [\"active_connections\"])\n\n# Query directly\nquery_render_postgres(\n  postgresId: \"<postgres-id>\",\n  sql: \"SELECT state, count(*) FROM pg_stat_activity GROUP BY state\"\n)\n```\n\nDetailed database guide: [references/database-debugging.md](references/database-debugging.md)\n\n### Step 6: Apply Fix\n\n**For environment variables:**\n```\nupdate_environment_variables(\n  serviceId: \"<service-id>\",\n  envVars: [{\"key\": \"MISSING_VAR\", \"value\": \"value\"}]\n)\n```\n\n**For code changes:**\n1. Edit the source file\n2. Commit and push\n3. Deploy triggers automatically (if auto-deploy enabled)\n\n### Step 7: Verify Fix\n\n```\n# Check deploy status\nlist_deploys(serviceId: \"<service-id>\", limit: 1)\n\n# Check for new errors\nlist_logs(resource: [\"<service-id>\"], level: [\"error\"], limit: 20)\n\n# Check metrics\nget_metrics(resourceId: \"<service-id>\", metricTypes: [\"http_request_count\"])\n```\n\n---\n\n## Quick Workflows\n\nPre-built debugging sequences for common scenarios:\n\n| Scenario | Workflow |\n|----------|----------|\n| Deploy failed | `list_deploys` → `list_logs(type: build)` → fix → redeploy |\n| App crashing | `list_logs(level: error)` → `get_metrics(memory)` → fix |\n| App slow | `get_metrics(http_latency)` → `get_metrics(cpu)` → `query_postgres` |\n| DB connection | `list_postgres` → `get_metrics(connections)` → `query_postgres` |\n| Post-deploy check | `list_deploys` → `list_logs(error)` → `get_metrics` |\n\nDetailed workflows: [references/quick-workflows.md](references/quick-workflows.md)\n\n---\n\n## Quick Reference\n\n### MCP Tools\n\n```\n# Service Discovery\nlist_services()\nget_service(serviceId: \"<id>\")\nlist_postgres_instances()\n\n# Logs\nlist_logs(resource: [\"<id>\"], level: [\"error\"], limit: 100)\nlist_logs(resource: [\"<id>\"], type: [\"build\"], limit: 200)\nlist_logs(resource: [\"<id>\"], text: [\"search\"], limit: 50)\n\n# Metrics\nget_metrics(resourceId: \"<id>\", metricTypes: [\"cpu_usage\", \"memory_usage\"])\nget_metrics(resourceId: \"<id>\", metricTypes: [\"http_latency\"], httpLatencyQuantile: 0.95)\n\n# Database\nquery_render_postgres(postgresId: \"<id>\", sql: \"SELECT ...\")\n\n# Deployments\nlist_deploys(serviceId: \"<id>\", limit: 5)\n\n# Environment Variables\nupdate_environment_variables(serviceId: \"<id>\", envVars: [{key, value}])\n```\n\n### CLI Commands (Fallback)\n\n```bash\nrender services -o json\nrender logs -r <service-id> --level error -o json\nrender logs -r <service-id> --tail -o text\nrender deploys create <service-id> --wait\n```\n\n---\n\n## References\n\n- **Error patterns:** [references/error-patterns.md](references/error-patterns.md)\n- **Metrics debugging:** [references/metrics-debugging.md](references/metrics-debugging.md)\n- **Database debugging:** [references/database-debugging.md](references/database-debugging.md)\n- **Quick workflows:** [references/quick-workflows.md](references/quick-workflows.md)\n- **Log analysis:** [references/log-analysis.md](references/log-analysis.md)\n- **Troubleshooting:** [references/troubleshooting.md](references/troubleshooting.md)\n\n## Related Skills\n\n- **render-deploy** — Deploy new applications to Render\n- **render-monitor** — Ongoing service health monitoring\n- **render-mcp** — MCP server setup and tool catalog\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}