Generated banner for Render Debug
Generated logo for Render Debug

Render Debug

RenderOfficialCreated by Render

  • Skill
  • Tool integration
  • Cloud and DevOps
  • MIT
  • Low risk

From the author

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.
— the description by Render

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The render-debug skill provides a structured approach to troubleshooting Render services. It guides users through identifying failed services, retrieving relevant logs, analyzing performance metrics, and querying database state to pinpoint root causes like configuration errors, resource exhaustion, or connection issues. The skill integrates with Render's MCP tools to automate data collection and suggests common fixes for identified error patterns.

What it does

  • Lists and inspects status of Render services and deployments
  • Retrieves and filters build, runtime, and HTTP error logs
  • Analyzes CPU, memory, and latency metrics to identify performance bottlenecks
  • Queries PostgreSQL instances to diagnose connection and query performance issues
  • Maps common error patterns to actionable remediation steps
  • Provides workflows for verifying fixes through log and metric validation

When to use it

  • When a Render deployment fails to complete
  • When a service crashes or fails to start
  • When application health checks are timing out
  • When users report production errors or performance degradation
  • When diagnosing database connection or query latency problems

Advantages

  • Standardizes the debugging process for Render environments
  • Reduces manual log searching by targeting specific error types
  • Provides direct access to database diagnostics via SQL queries
  • Offers clear remediation paths for common configuration and resource issues

Usage examples

“My service is failing to deploy on Render, can you help?”
The agent will list your services, identify the failed one, retrieve the relevant build logs, and analyze them against known error patterns to suggest a fix.
“My app is running very slowly, check the metrics.”
The agent will fetch CPU, memory, and HTTP latency metrics for the service to determine if resource constraints or slow database queries are the cause.
“I am getting ECONNREFUSED errors from my database.”
The agent will check the database status, analyze active connection counts, and query pg_stat_activity to identify potential connection pool exhaustion.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/render-oss/render-debug/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip render-debug.zip -d .agents/skills

Documentation by Render

Debug Render Deployments

Analyze deployment failures using logs, metrics, and database queries. Identify root causes and apply fixes.

When to Use This Skill

Activate this skill when:

  • Deployment fails on Render

  • Service won't start or keeps crashing

  • User mentions errors, logs, or debugging

  • Health checks are timing out

  • Application errors in production

  • Performance issues (slow responses)

  • Database connection problems

Render Access

Before reading logs, metrics, or database state, follow references/render-access.md to establish access and verify the intended workspace. Prefer MCP when available; the CLI can provide logs and deploy status, while metrics and structured database queries require MCP.


Debugging Workflow

When the failure involves configuration or secrets, read references/environment-variables.md before inspecting or changing service variables. When the failure involves deploy state, rollout, health checks, restart, rollback, or shutdown, read references/deployments.md before diagnosing it.

Step 1: Identify Failed Service
list_services()

If MCP isn't configured, ask whether to set it up (preferred) or continue with CLI. Then proceed.

Look for services with failed status. Get details:

get_service(serviceId: "<id>")
Step 2: Retrieve Logs

Build/Deploy Logs (most failures):

list_logs(resource: ["<service-id>"], type: ["build"], limit: 200)

Runtime Error Logs:

list_logs(resource: ["<service-id>"], level: ["error"], limit: 100)

Search for Specific Errors:

list_logs(resource: ["<service-id>"], text: ["KeyError", "ECONNREFUSED"], limit: 50)

HTTP Error Logs:

list_logs(resource: ["<service-id>"], statusCode: ["500", "502", "503"], limit: 50)
Step 3: Analyze Error Patterns

Match log errors against known patterns:

ErrorLog PatternCommon Fix
MISSING_ENV_VARKeyError, not definedAdd to render.yaml or update_environment_variables
PORT_BINDINGEADDRINUSEUse 0.0.0.0:$PORT
MISSING_DEPENDENCYCannot find moduleAdd to package.json/requirements.txt
DATABASE_CONNECTIONECONNREFUSED :5432Check DATABASE_URL, DB status
HEALTH_CHECKHealth check timeoutAdd /health endpoint, check port binding
OUT_OF_MEMORYheap out of memory, exit 137Optimize memory or upgrade plan
BUILD_FAILURECommand failedFix build command or dependencies

Full error catalog: references/error-patterns.md

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.

Step 4: Check Metrics (Performance Issues)

For crashes, slow responses, or resource issues:

get_metrics(
  resourceId: "<service-id>",
  metricTypes: ["cpu_usage", "memory_usage", "memory_limit"]
)
get_metrics(
  resourceId: "<service-id>",
  metricTypes: ["http_latency"],
  httpLatencyQuantile: 0.95
)

Detailed metrics guide: references/metrics-debugging.md

Step 5: Debug Database Issues

For database-related errors:

# Check database status
list_postgres_instances()

# Check connections
get_metrics(resourceId: "<postgres-id>", metricTypes: ["active_connections"])

# Query directly
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT state, count(*) FROM pg_stat_activity GROUP BY state"
)

Detailed database guide: references/database-debugging.md

Step 6: Apply Fix

For environment variables:

update_environment_variables(
  serviceId: "<service-id>",
  envVars: [{"key": "MISSING_VAR", "value": "value"}]
)

For code changes:

  1. Edit the source file

  2. Commit and push

  3. Deploy triggers automatically (if auto-deploy enabled)

Step 7: Verify Fix
# Check deploy status
list_deploys(serviceId: "<service-id>", limit: 1)

# Check for new errors
list_logs(resource: ["<service-id>"], level: ["error"], limit: 20)

# Check metrics
get_metrics(resourceId: "<service-id>", metricTypes: ["http_request_count"])

Quick Workflows

Pre-built debugging sequences for common scenarios:

ScenarioWorkflow
Deploy failedlist_deploys → list_logs(type: build) → fix → redeploy
App crashinglist_logs(level: error) → get_metrics(memory) → fix
App slowget_metrics(http_latency) → get_metrics(cpu) → query_postgres
DB connectionlist_postgres → get_metrics(connections) → query_postgres
Post-deploy checklist_deploys → list_logs(error) → get_metrics

Detailed workflows: references/quick-workflows.md


Quick Reference

MCP Tools
# Service Discovery
list_services()
get_service(serviceId: "<id>")
list_postgres_instances()

# Logs
list_logs(resource: ["<id>"], level: ["error"], limit: 100)
list_logs(resource: ["<id>"], type: ["build"], limit: 200)
list_logs(resource: ["<id>"], text: ["search"], limit: 50)

# Metrics
get_metrics(resourceId: "<id>", metricTypes: ["cpu_usage", "memory_usage"])
get_metrics(resourceId: "<id>", metricTypes: ["http_latency"], httpLatencyQuantile: 0.95)

# Database
query_render_postgres(postgresId: "<id>", sql: "SELECT ...")

# Deployments
list_deploys(serviceId: "<id>", limit: 5)

# Environment Variables
update_environment_variables(serviceId: "<id>", envVars: [{key, value}])
CLI Commands (Fallback)
render services -o json
render logs -r <service-id> --level error -o json
render logs -r <service-id> --tail -o text
render deploys create <service-id> --wait

References

  • render-deploy — Deploy new applications to Render

  • render-monitor — Ongoing service health monitoring

  • render-mcp — MCP server setup and capability discovery

<!-- shared:documentation-retrieval -->

Current documentation retrieval

Whenever this skill directs you to consult current Render documentation:

  1. Retrieve the linked Markdown document directly with an available URL-fetching tool or HTTP client, such as curl. Do not substitute web-search summaries for the document.

  2. Confirm that retrieval succeeded and returned the expected document, then read its contents. Saving a file or printing its path is not sufficient.

  3. If the request fails or your tool cannot read the Markdown response, open and read the linked HTML version instead.

  4. If neither version can be retrieved, disclose that the current reference is unavailable and follow any topic-specific fallback in the skill. Use bundled guidance only for stable constraints, and do not guess at changeable platform details.

When a task requires multiple references, apply this workflow to each one and distinguish the documents you verified from those that remain unavailable.

<!-- /shared:documentation-retrieval -->

Files

references/database-debugging.md

Database Debugging

Diagnose and fix PostgreSQL database issues on Render using MCP tools.

When to Use Database Debugging

Use these techniques when you see:

  • ECONNREFUSED or connection errors

  • ETIMEDOUT on database operations

  • Slow queries affecting application performance

  • Connection pool exhaustion

  • Database CPU/memory alerts

Connection Debugging

Check Database Status
list_postgres_instances()

Verify the database exists and note its ID.

Get Database Details
get_postgres(postgresId: "<postgres-id>")
Check Connection Metrics
get_metrics(
  resourceId: "<postgres-id>",
  metricTypes: ["active_connections"],
  startTime: "<1-hour-ago-ISO8601>"
)
Query Active Connections
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT state, count(*) FROM pg_stat_activity GROUP BY state"
)

Connection states:

StateMeaning
activeRunning a query
idleConnected but not running query
idle in transactionIn a transaction, not running query (potential issue)
idle in transaction (aborted)Transaction failed, connection stuck
Check Connection Limits
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT max_conn, used, res_for_super, max_conn - used - res_for_super AS available FROM (SELECT count(*) used FROM pg_stat_activity) t, (SELECT setting::int res_for_super FROM pg_settings WHERE name = 'superuser_reserved_connections') t2, (SELECT setting::int max_conn FROM pg_settings WHERE name = 'max_connections') t3"
)

Connection limits vary by Postgres compute plan. Fetch the current plan table and limits using compute-plans.md, then compare them with the database's live max_connections value.

Fix Connection Issues

Connection pool exhaustion:

  1. Implement connection pooling in your app

  2. Reduce connection timeout

  3. Close connections properly

  4. Upgrade the database compute plan

Node.js connection pooling:

const { Pool } = require('pg');
const pool = new Pool({
  connectionString: process.env.DATABASE_URL,
  max: 20,  // Maximum connections in pool
  idleTimeoutMillis: 30000,
  connectionTimeoutMillis: 2000,
});

Python connection pooling:

from sqlalchemy import create_engine
engine = create_engine(
    DATABASE_URL,
    pool_size=5,
    max_overflow=10,
    pool_timeout=30,
    pool_recycle=1800
)

Query Performance Debugging

Find Slow Queries
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT query, calls, mean_exec_time, total_exec_time, rows FROM pg_stat_statements ORDER BY mean_exec_time DESC LIMIT 10"
)

Note: pg_stat_statements must be enabled (it is by default on Render).

Find Queries by Total Time
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT query, calls, total_exec_time, mean_exec_time FROM pg_stat_statements ORDER BY total_exec_time DESC LIMIT 10"
)

This finds queries that consume the most total time (even if individual executions are fast).

Analyze Query Plans

For a specific slow query, run EXPLAIN ANALYZE (be careful in production):

query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT) SELECT * FROM users WHERE email = '[email protected]'"
)

Look for:

  • Seq Scan on large tables (missing index)

  • High rows estimates vs actual rows (stale statistics)

  • Nested loops with high row counts (N+1 pattern)

Check Missing Indexes
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT schemaname, relname, seq_scan, seq_tup_read, idx_scan, idx_tup_fetch FROM pg_stat_user_tables WHERE seq_scan > 0 ORDER BY seq_tup_read DESC LIMIT 10"
)

Tables with high seq_scan and low idx_scan may need indexes.

Check Index Usage
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT schemaname, relname, indexrelname, idx_scan, idx_tup_read, idx_tup_fetch FROM pg_stat_user_indexes ORDER BY idx_scan DESC LIMIT 20"
)

Indexes with idx_scan = 0 are unused and could be removed.

Lock Debugging

Check for Lock Contention
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT blocked_locks.pid AS blocked_pid, blocked_activity.usename AS blocked_user, blocking_locks.pid AS blocking_pid, blocking_activity.usename AS blocking_user, blocked_activity.query AS blocked_statement, blocking_activity.query AS blocking_statement FROM pg_catalog.pg_locks blocked_locks JOIN pg_catalog.pg_stat_activity blocked_activity ON blocked_activity.pid = blocked_locks.pid JOIN pg_catalog.pg_locks blocking_locks ON blocking_locks.locktype = blocked_locks.locktype AND blocking_locks.database IS NOT DISTINCT FROM blocked_locks.database AND blocking_locks.relation IS NOT DISTINCT FROM blocked_locks.relation AND blocking_locks.page IS NOT DISTINCT FROM blocked_locks.page AND blocking_locks.tuple IS NOT DISTINCT FROM blocked_locks.tuple AND blocking_locks.virtualxid IS NOT DISTINCT FROM blocked_locks.virtualxid AND blocking_locks.transactionid IS NOT DISTINCT FROM blocked_locks.transactionid AND blocking_locks.classid IS NOT DISTINCT FROM blocked_locks.classid AND blocking_locks.objid IS NOT DISTINCT FROM blocked_locks.objid AND blocking_locks.objsubid IS NOT DISTINCT FROM blocked_locks.objsubid AND blocking_locks.pid != blocked_locks.pid JOIN pg_catalog.pg_stat_activity blocking_activity ON blocking_activity.pid = blocking_locks.pid WHERE NOT blocked_locks.granted LIMIT 10"
)
Check Long-Running Queries
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT pid, now() - pg_stat_activity.query_start AS duration, query, state FROM pg_stat_activity WHERE (now() - pg_stat_activity.query_start) > interval '1 minute' AND state != 'idle' ORDER BY duration DESC"
)

Storage Debugging

Check Table Sizes
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT schemaname, relname, pg_size_pretty(pg_total_relation_size(relid)) AS total_size, pg_size_pretty(pg_relation_size(relid)) AS table_size, pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) AS index_size FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC LIMIT 10"
)
Check Database Size
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT pg_size_pretty(pg_database_size(current_database())) AS database_size"
)
Check Table Bloat
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT schemaname, relname, n_live_tup, n_dead_tup, round(n_dead_tup::numeric / nullif(n_live_tup + n_dead_tup, 0) * 100, 2) AS dead_percentage FROM pg_stat_user_tables WHERE n_dead_tup > 1000 ORDER BY n_dead_tup DESC LIMIT 10"
)

Tables with high dead_percentage (>20%) may need VACUUM.

Database Resource Metrics

Check Database CPU
get_metrics(
  resourceId: "<postgres-id>",
  metricTypes: ["cpu_usage"],
  startTime: "<1-hour-ago-ISO8601>"
)

High database CPU usually indicates:

  • Slow queries doing full table scans

  • Complex joins without proper indexes

  • High query volume

Check Database Memory
get_metrics(
  resourceId: "<postgres-id>",
  metricTypes: ["memory_usage"],
  startTime: "<1-hour-ago-ISO8601>"
)

Quick Diagnosis Workflows

"Database connection refused"
# 1. Check database exists and status
list_postgres_instances()

# 2. Check connection count (might be at limit)
get_metrics(resourceId: "<postgres-id>", metricTypes: ["active_connections"])

# 3. Check for stuck connections
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT state, count(*) FROM pg_stat_activity GROUP BY state"
)

# 4. Verify service has correct DATABASE_URL
get_service(serviceId: "<service-id>")
"Database queries are slow"
# 1. Find slowest queries
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT query, mean_exec_time FROM pg_stat_statements ORDER BY mean_exec_time DESC LIMIT 5"
)

# 2. Check for missing indexes
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT relname, seq_scan, idx_scan FROM pg_stat_user_tables WHERE seq_scan > idx_scan ORDER BY seq_scan DESC LIMIT 5"
)

# 3. Check database CPU (might be overloaded)
get_metrics(resourceId: "<postgres-id>", metricTypes: ["cpu_usage"])
"Database storage full"
# 1. Check current size
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT pg_size_pretty(pg_database_size(current_database()))"
)

# 2. Find largest tables
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT relname, pg_size_pretty(pg_total_relation_size(relid)) FROM pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC LIMIT 5"
)

# 3. Check for bloat
query_render_postgres(
  postgresId: "<postgres-id>",
  sql: "SELECT relname, n_dead_tup FROM pg_stat_user_tables ORDER BY n_dead_tup DESC LIMIT 5"
)

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an MCP server

The author says: Requires Render MCP tools or CLI

Security

What our scanner noticed· Low risk

  • Instructions that use the network

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Render
Publisher
Render (Official)
Source
render-oss/skills · skills/render-debug · commit b985a63
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Render.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download render-debug.zip