Ponder.sh healthcheck fails after adding in API functionality

andrewwanggit
TRIAL

10 months ago

Logs:

Build time: 65.80 seconds

====================

Starting Healthcheck

====================

Path: /ready

Retry window: 5m0s

Attempt #1 failed with service unavailable. Continuing to retry for 4m49s

Attempt #2 failed with service unavailable. Continuing to retry for 4m38s

Attempt #3 failed with service unavailable. Continuing to retry for 4m26s

Attempt #4 failed with service unavailable. Continuing to retry for 4m19s

This only happened after I created the src/api/index.ts file in my Ponder application. Before, I did that, the service deployed perfectly fine. Does anyone know why this is?

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

Solved

12 Replies

10 months ago

Because the application itself never started, check the deploy logs.


andrewwanggit
TRIAL

10 months ago

Because the application itself never started, check the deploy logs.

Hey brody!

That makes sense! I'm getting this fatal error in my deploy logs:

9:25:51 PM INFO build Using Postgres database 'postgres.railway.internal:5432/railway' (from DATABASE_URL env var)

Sep 21 17:25:53

9:25:51 PM INFO build Using 'public' database schema for indexed tables (from ponder.config.ts)

Sep 21 17:25:53

9:25:51 PM WARN database Schema 'public' is locked by a different Ponder app

Sep 21 17:25:53

9:25:51 PM WARN database Waiting 16s for lock on schema 'public to expire...

Sep 21 17:26:09

container event container died

Sep 21 17:26:13

9:26:08 PM ERROR process Caught uncaughtException event

Sep 21 17:26:13

NonRetryableError: Failed to acquire lock on schema 'public'. A different Ponder app is actively using this database.

Sep 21 17:26:13

at Object.setup (file:///app/node_modules/@ponder/core/src/database/index.ts:1032:17)

Sep 21 17:26:13

at processTicksAndRejections (node:internal/process/task_queues:95:5)

Sep 21 17:26:13

at run (file:///app/node_modules/@ponder/core/src/bin/utils/run.ts:54:45)

Sep 21 17:26:13

at start2 (file:///app/node_modules/@ponder/core/src/bin/commands/start.ts:72:23)

Sep 21 17:26:13

at Command.<anonymous> (file:///app/node_modules/@ponder/core/src/bin/ponder.ts:94:5)

Sep 21 17:26:13

at Command.parseAsync (/app/node_modules/commander/lib/command.js:1092:5)

Sep 21 17:26:13

at file:///app/node_modules/@ponder/core/src/bin/ponder.ts:159:1

Sep 21 17:26:13

Sep 21 17:26:13

9:26:08 PM WARN process Received uncaughtException, starting shutdown sequence

Sep 21 17:26:13

9:26:08 PM FATAL process Finished shutdown sequence, terminating (exit code 1)

Sep 21 17:27:10

Stopping Container

I'm deploying to the same Postgres database that the old instance was deployed to. Any ideas on how I can solve this by chance? Thank you so much in advance!


10 months ago

Looks like you never released a lock on your database, try redeploying the database, then redeploy your ponder service.


andrewwanggit
TRIAL

10 months ago

Hey brody! Thanks for such a quick reply again. It doesn't seem to be working for me. I redeployed my Postgres database and then immediately redeployed the Ponder service, but I'm getting the same error. Could you guide me on how to release the lock on my database (and what that exactly means?) Thank you so much again!


10 months ago

Per your deploy logs -

A different Ponder app is actively using this database.

You would want to make sure you are not having anything else connect to this database.


andrewwanggit
TRIAL

10 months ago

I don't have anything else connected to this database other than my original Ponder app. I also terminated everything locally. Is there a way I can see what is being connected to the database in the Railway dashboard?

Attachments


10 months ago

Railway is only running the database as-is and thus does not provide such functionality.

Disconnect all other ponder apps, and redeploy the database and your ponder service again.

If you still run into the locking issue then you have most likely recently introduced a bug and you should revert your commits.


10 months ago

Just had a thought, your current active deployment could be holding a lock, remove it.


andrewwanggit
TRIAL

10 months ago

Got it - that probably is it because I definitely don't have any other instances connected to the database. Could you guide me on how to remove the lock on my current active deployment? I assume this is for the Ponder app


10 months ago

As previously mentioned, remove the active deployment.


andrewwanggit
TRIAL

10 months ago

You're the man, it worked perfectly! Thank you so much. In the future, do I need to manually remove the active deployment every time or is there a way I can automate this process?


10 months ago

Try setting a RAILWAY_DEPLOYMENT_OVERLAP_SECONDS variable to 0


Status changed to Solved brody 10 months ago