Remix starter app. Broken deploy because of unreachable DB

I am using a (mostly) untouched copy of the remix starter app to get up an running on Render. This repo uses a Render “blueprint” i.e. it has a render.yaml file.

Deploys were working until I… deleted the web service and DB manually, in order to rename both services (using an updated render.yaml file). Before manually deleting, I first tried updating the yaml file, which created a new web service as expected, but failed to create a new database, so I ended up just deleting everything, thinking that would give me a fresh start. But I’m now facing the below error when deploying my web service.

The actual deployment error

Error: P1001: Can't reach database server at `dpg-cn9a43un7f5s73fmepj0-a`:`5432`

My yaml file

databases:
  - name: dealer-marketplace-db
    plan: starter

services:
  - type: web
    name: dealer-marketplace
    env: node
    plan: starter
    buildCommand: npm ci --production=false && npm run build && npm prune --production
    startCommand: npx prisma migrate deploy && npm run start
    healthCheckPath: /healthcheck
    envVars:
      - key: DATABASE_URL
        fromDatabase:
          name: dealer-marketplace-db
          property: connectionString
      - key: SESSION_SECRET
        generateValue: true
      - key: NODE_ENV #required so NODE_ENV is set in build env
        value: production

Hey Jonathan,

It’s difficult to tell here, but I’d want to check what the DB ID of dealer-marketplace-db is and ensure that DATABASE_URL on dealer-marketplace is pointing at the same instance. If you deleted everything and started from scratch I’d hope that the correct value was set on the webservice pointing at the new provisioned DB.

Regards,

John B
Render Support, UTC :uk:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.