← Back to Case Library

Deploy config defaulted the production database host to a dead hostname

DomainDEVOPS ImpactCritical
Error Signature
DB connection failure: getaddrinfo ENOTFOUND server1.linkchain.com

QueryKey Cases's production and staging env templates hardcoded DB_HOST=server1.linkchain.com - a hostname from an old shared-hosting box that no longer resolves in real DNS at all (confirmed NXDOMAIN). Any deploy that copied these templates as-is would have broken database connectivity outright.

Root Cause

Infrastructure had already consolidated onto a new dedicated server (loopback-only MariaDB) but the env templates were never updated to reflect the migration - they still referenced the old shared-hosting box's hostname from before the move.

Solution Steps

  1. Change DB_HOST in both config/env/.env.production.template and .env.staging.template from server1.linkchain.com to 127.0.0.1, since MariaDB on the actual current host is loopback-only.
  2. Add an inline comment explaining why 127.0.0.1 is correct, so a future maintainer does not revert it back to a remote hostname.
  3. Independently confirm the old hostname genuinely does not resolve.

Validation

[object Object]

Rollback

[object Object]

Ecosystem: devops

License: CC-BY-4.0

Last updated: Jul 6, 2026

Case ID: 4a11c240-3f0c-456b-9101-a1a7aadfcf2e