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://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/troubleshooting.md

Render Troubleshooting Guide

Systematic debugging procedures and fix strategies for common Render deployment issues.

General Debugging Process

The 5-Step Debugging Method
  1. Identify - What's failing? (Build, deploy, runtime?)

  2. Locate - Where's the error? (Logs, error messages)

  3. Diagnose - Why is it failing? (Root cause)

  4. Fix - Apply appropriate solution

  5. Verify - Test the fix works

Debug Priority Checklist

When facing deployment issues, check in this order:

  • [ ] Environment variables (Most common)

  • [ ] Port binding (Second most common)

  • [ ] Dependencies installed correctly

  • [ ] Database connections configured

  • [ ] Build command successful

  • [ ] Start command correct

  • [ ] Health check endpoint exists

  • [ ] Resource limits (memory, CPU)

Issue Category 1: Environment Variables

Problem: Missing Environment Variable

Symptoms:

  • ReferenceError: DATABASE_URL is not defined

  • KeyError: 'API_KEY'

  • Service crashes immediately after start

Diagnosis Steps:

  1. Check logs for variable name:

render logs -r <service-id> --level error -o json | grep "not defined"
  1. List current environment variables:

# In Dashboard or render.yaml
  1. Identify which variable is missing

Fix Procedure:

  1. Read environment-variables.md, identify the intended source of truth, and inspect existing keys without exposing values.

  2. Add the missing key through that configuration surface, using current Blueprint wiring for resource references and an appropriate secret mechanism for sensitive values.

  3. Commit and push if the service is Blueprint-managed; otherwise apply the authorized service configuration change.

  4. Trigger the applicable deploy so the new value becomes active.

Verification:

render logs -r <service-id> --tail -o text
# Should see successful startup

Issue Category 2: Port Binding

Problem: Port Binding Error

Symptoms:

  • EADDRINUSE: address already in use

  • Health check timeout

  • Service starts but doesn't receive traffic

Diagnosis Steps:

  1. Check if app hardcodes port:

# Look for hardcoded ports in code
grep -r "listen(3000" .
grep -r "port.*=" . | grep -v "process.env"
  1. Check if binding to localhost:

grep -r "localhost" .
grep -r "127.0.0.1" .

Fix Procedure by Language:

Node.js / Express:

Before (WRONG):

app.listen(3000);
// or
app.listen(3000, 'localhost');

After (CORRECT):

const PORT = process.env.PORT || 3000;
app.listen(PORT, '0.0.0.0', () => {
  console.log(`Server running on port ${PORT}`);
});

Python / Flask:

Before (WRONG):

app.run(port=5000)

After (CORRECT):

import os

if __name__ == '__main__':
    port = int(os.environ.get('PORT', 5000))
    app.run(host='0.0.0.0', port=port)

Python / Django:

Ensure gunicorn uses $PORT:

# In render.yaml
startCommand: gunicorn config.wsgi:application --bind 0.0.0.0:$PORT

Go:

Before (WRONG):

http.ListenAndServe(":3000", handler)

After (CORRECT):

port := os.Getenv("PORT")
if port == "" {
    port = "3000"
}
http.ListenAndServe(":"+port, handler)

Verification:

# Should see message like "Server running on port 10000"
render logs -r <service-id> --tail -o text

Issue Category 3: Database Connection

Problem: Cannot Connect to Database

Symptoms:

  • ECONNREFUSED 127.0.0.1:5432

  • could not connect to server

  • Connection refused

Diagnosis Steps:

  1. Check if DATABASE_URL is set:

# Look in render.yaml
grep "DATABASE_URL" render.yaml
  1. Verify database is provisioned:

render services -o json
# Look for database service
  1. Check connection code

Fix Procedure:

Step 1: Ensure DATABASE_URL in render.yaml

envVars:
  - key: DATABASE_URL
    fromDatabase:
      name: postgres
      property: connectionString

databases:
  - name: postgres
    databaseName: myapp_prod
    plan: free

Step 2: Configure SSL if needed

Node.js / pg:

const { Pool } = require('pg');

const pool = new Pool({
  connectionString: process.env.DATABASE_URL,
  ssl: process.env.NODE_ENV === 'production' ? {
    rejectUnauthorized: false
  } : false
});

Python / psycopg2:

import psycopg2

conn = psycopg2.connect(
    os.environ['DATABASE_URL'],
    sslmode='require'
)

Step 3: Add connection pooling

Node.js:

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

Python:

from sqlalchemy import create_engine
from sqlalchemy.pool import QueuePool

engine = create_engine(
    os.environ['DATABASE_URL'],
    poolclass=QueuePool,
    pool_size=10,
    max_overflow=20
)

Step 4: Test connection

// Add health check with DB ping
app.get('/health', async (req, res) => {
  try {
    await pool.query('SELECT 1');
    res.status(200).json({ status: 'ok', database: 'connected' });
  } catch (err) {
    res.status(500).json({ status: 'error', database: 'disconnected' });
  }
});

Issue Category 4: Build Failures

Problem: Build Command Fails

Symptoms:

  • npm ERR!

  • error: failed to compile

  • Build timeout

Diagnosis Steps:

  1. Check build logs:

render logs -r <service-id> --type deploy --level error -o json
  1. Identify error type:

  • Missing dependency?

  • Compilation error?

  • Build timeout?

Fix Procedures:

Missing Dependency:

Check package.json/requirements.txt:

{
  "dependencies": {
    "express": "^4.18.0"  // Add missing package
  }
}

Build Command Wrong:

Fix in render.yaml:

# Node.js
buildCommand: npm ci && npm run build

# Python
buildCommand: pip install -r requirements.txt

# Go
buildCommand: go build -o bin/app .

Build Timeout (120-minute build-command limit):

Optimize:

# Use ci instead of install (faster)
buildCommand: npm ci --prefer-offline && npm run build

# Remove unused dependencies
# Consider pre-building expensive artifacts in CI/CD

Issue Category 5: Health Check Failures

Problem: Health Check Timeout

Read deployments.md for current health-check behavior, timing, and service-type support before diagnosing this failure.

Symptoms:

  • Health check timeout

  • failed to become healthy

Diagnosis Steps:

  1. Check if app is binding to correct port

  2. Check whether the configured health check endpoint exists and returns an accepted response

  3. Check startup time

Fix Procedure:

Step 1: Add health endpoint

Node.js:

app.get('/health', (req, res) => {
  res.status(200).json({
    status: 'ok',
    timestamp: new Date().toISOString()
  });
});

Python / Flask:

@app.route('/health')
def health():
    return {'status': 'ok'}, 200

Python / FastAPI:

@app.get("/health")
async def health():
    return {"status": "ok"}

Go:

http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
    w.WriteHeader(http.StatusOK)
    json.NewEncoder(w).Encode(map[string]string{"status": "ok"})
})

Step 2: Configure in render.yaml

healthCheckPath: /health

Step 3: Optimize startup time

Move slow operations after server start:

// Start server first
const server = app.listen(PORT, '0.0.0.0', () => {
  console.log(`Server running on port ${PORT}`);

  // Then do slow operations
  initializeCache();
  warmupConnections();
});

Issue Category 6: Memory Issues

Problem: Out of Memory

Symptoms:

  • JavaScript heap out of memory

  • Killed (exit code 137)

  • Service crashes randomly

Diagnosis Steps:

  1. Check logs for OOM errors

  2. Monitor memory usage

  3. Identify memory leaks

Fix Procedures:

Immediate Fix (Node.js):

Increase heap size (if on paid plan):

envVars:
  - key: NODE_OPTIONS
    value: --max-old-space-size=2048  # 2GB

Long-term Fixes:

  1. Profile memory usage:

// Add memory monitoring
setInterval(() => {
  const used = process.memoryUsage();
  console.log(`Memory: ${Math.round(used.heapUsed / 1024 / 1024)}MB`);
}, 60000);
  1. Optimize data processing:

// Process in chunks instead of all at once
for (let i = 0; i < data.length; i += 1000) {
  const chunk = data.slice(i, i + 1000);
  await processChunk(chunk);
}
  1. Fix memory leaks:

  • Clear intervals/timeouts

  • Remove event listeners

  • Close database connections

  • Clear caches periodically

  1. Upgrade plan:

  • Free: 512 MB

  • Starter: 512 MB

  • Standard: 2 GB

  • Pro: 4 GB+


Issue Category 7: Runtime Crashes

Problem: Service Crashes After Start

Symptoms:

  • Service starts then exits

  • Process exited with code 1

  • Uncaught exceptions

Diagnosis Steps:

  1. Get runtime logs:

render logs -r <service-id> --level error -o json
  1. Look for uncaught errors:

  • Unhandled Promise rejections

  • Uncaught exceptions

  • Fatal errors

Fix Procedure:

Add error handlers:

Node.js:

// Catch all uncaught errors
process.on('uncaughtException', (err) => {
  console.error('Uncaught Exception:', err);
  process.exit(1);
});

process.on('unhandledRejection', (reason, promise) => {
  console.error('Unhandled Rejection at:', promise, 'reason:', reason);
  process.exit(1);
});

// Express error handler (add last)
app.use((err, req, res, next) => {
  console.error(err.stack);
  res.status(500).json({ error: 'Internal server error' });
});

Python:

import logging

logging.basicConfig(level=logging.ERROR)
logger = logging.getLogger(__name__)

try:
    # Your code
    app.run()
except Exception as e:
    logger.error(f"Fatal error: {e}", exc_info=True)
    raise

Decision Tree: Where to Start

Deployment Failed?
├─ Build phase failed?
│  ├─ Check build logs for errors
│  ├─ Verify buildCommand is correct
│  ├─ Check dependencies installed
│  └─ Fix compilation errors
│
├─ Deploy phase failed?
│  ├─ Check start command
│  ├─ Verify port binding
│  ├─ Check environment variables
│  └─ Check health check endpoint
│
└─ Runtime failures?
   ├─ Check for uncaught exceptions
   ├─ Verify database connections
   ├─ Check memory usage
   └─ Review application logs

Debugging Checklist

Before asking for help, verify:

  • [ ] Required environment-variable keys exist in the intended configuration source

  • [ ] Secret configuration is complete without exposing values

  • [ ] App binds to process.env.PORT (or equivalent)

  • [ ] App binds to 0.0.0.0 (not localhost)

  • [ ] Build command is non-interactive

  • [ ] Dependencies are in package.json/requirements.txt

  • [ ] DATABASE_URL is set if using database

  • [ ] /health endpoint exists (if using health checks)

  • [ ] Local build works (npm ci && npm run build)

  • [ ] Start command is correct

Quick Fixes Reference

ProblemQuick Fix
Missing env varAdd to render.yaml envVars
Port bindingUse process.env.PORT + 0.0.0.0
Database connectionAdd DATABASE_URL with fromDatabase
Missing dependencyAdd to package.json/requirements.txt
Build timeoutOptimize build, use npm ci
Health check timeoutAdd /health endpoint
OOMOptimize memory or upgrade plan
Uncaught exceptionAdd error handlers

Advanced Troubleshooting

Enable Debug Logging

Node.js:

envVars:
  - key: DEBUG
    value: "*"  # Enable all debug logs
  - key: NODE_ENV
    value: development  # More verbose logs
Test Locally First
# Simulate Render environment
export PORT=10000
export DATABASE_URL="postgresql://..."
npm ci && npm run build && npm start
Check Render Status

Sometimes issues are platform-wide:

Getting Help

If stuck after trying these steps:

  1. Gather information:

    • Service ID

    • Error messages from logs

    • render.yaml content

    • Steps to reproduce

  2. Check documentation:

  3. Community support:

    • Render Community Forum

    • Discord server

Next Steps

After fixing issues:

  • Monitor service health in Dashboard

  • Set up alerts for failures

  • Document any custom configuration

  • Consider implementing monitoring/observability

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 or Render.

Download ZIP

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