Skip to main content

Render Deployment Troubleshooting

Quick reference for debugging failed deploys and env var issues on Render.

Env var changes and restarts

If you updated an env var (e.g. DISCORD_REDIRECT_URI) and the service did not restart:

Render lets you choose deploy behavior when saving env vars in the Dashboard:

  1. Save only — Variables are saved but the service keeps running with the old values until the next deploy.
  2. Save and deploy — Redeploys the existing build with the new variables.
  3. Save, rebuild, and deploy — Full rebuild and deploy.

If you chose Save only, the API (or agent) will not pick up the new value until you trigger a deploy.

Fix: Manually deploy from the Render Dashboard → your service → Manual Deploy, or push a commit to trigger auto-deploy. For ledgerline-api only, you can run:

RENDER_API_KEY=... pnpm render:deploy
pnpm render:watchbuild --logs

Checking deploy status and logs

The Render API sometimes returns empty deploy logs for failed deploys. When render:status --logs shows no log lines, open the Render Dashboard → service → Logs or Events for full build/release output.

CLI (no MCP)

# Status for API and Datadog agent (latest deploy)
RENDER_API_KEY=... pnpm render:status

# With recent deploy logs
RENDER_API_KEY=... pnpm render:status --logs

# Only API or only agent
RENDER_API_KEY=... pnpm render:status api --logs
RENDER_API_KEY=... pnpm render:status agent --logs
RENDER_API_KEY=... pnpm render:status all --logs

Watch a deploy in progress

RENDER_API_KEY=... pnpm render:watchbuild
RENDER_API_KEY=... pnpm render:watchbuild --logs

Render MCP (Cursor)

The Render MCP can tail logs and list deploys, but requires a workspace to be selected first.

  1. Use the Render MCP to select your workspace (ask the assistant to help).
  2. Then use /taillogs or list_logs / list_deploys / get_deploy for the target service.

Services:

  • ledgerline-api — Web API
  • datadog-agent — Private service for APM/DogStatsD

Common failure modes

SymptomCauseFix
API didn’t restart after env change"Save only" for env varsManual Deploy or push
build_failedBuild errors (deps, tsc, tsup)Check build logs; fix locally
update_failedBuild succeeded, start failedCheck deploy logs for startup errors
Invalid OAuth2 redirect_uriDISCORD_REDIRECT_URI ≠ Discord configMatch URI in Discord app to DISCORD_REDIRECT_URI
datadog-agent failedDocker build / DD_API_KEYSet DD_API_KEY on agent; check Dockerfile build
unable to reliably determine the host nameRender container has no resolvable hostnameSet DD_HOSTNAME in Dockerfile or Render env
connection refused :5001 (system-probe)Process agent needs system-probe; Render has noneSet DD_PROCESS_AGENT_ENABLED=false
Dynamic require of "hot-shots" is not supportedESM bundle; dep required dynamicallyUse import; add dep to tsup external

/info and /api/info

Debug endpoint returning deployment metadata, masked env vars, git branch/SHA, and build info. Use to quickly verify what is running in each environment.

curl https://your-service.onrender.com/api/info

Returns JSON: build, deployment (Render platform, service, branch, commit), env (masked values).

RENDER_API_KEY

Get your API key from Render Dashboard → Account Settings → API Keys. Set RENDER_API_KEY in .env or export it before running render:status, render:watchbuild, or render:deploy.