Deployment always fails at the database diff check step with: ‘The endpoint has been disabled. Enable it using the API and retry.’ Build command works fine. App is already deployed at [your URL] but can’t republish."
Hey onnnpj — welcome, and good news: this error isn’t coming from your code, which is why your build passes. Let me explain what’s happening, how I hit a cousin of this while building my own app, and a method to diagnose this whole category of bug with the Replit agent.
What the error actually means
The endpoint has been disabled. Enable it using the API and retry. comes from Neon — the serverless PostgreSQL that backs your database. In Neon, the “endpoint” is the compute engine of your database. Neon suspends/disables idle compute to save resources (and it can also be disabled at the account level, e.g. after hitting a plan limit).
Here’s why the symptom is so specific:
Your build passes because building never touches the database.
Republishing runs a database diff check (it compares your schema against the live DB) — and that step needs the database awake. Your endpoint is asleep/disabled, so the step fails.
So nothing is wrong with your app logic. The database compute just isn’t reachable at deploy time.
I hit the same family of bug building NEXIA
While building my app (NEXIA, a mobile AI assistant on Neon), I ran into the same root cause — Neon putting idle compute to sleep — but it showed up at a different moment. In my case it was at runtime: Neon recycled an idle connection from my connection pool (Postgres error 57P01, “terminating connection due to administrator command”). Because my pool had no error handler, that routine, recoverable Neon event crashed my whole server (502 + crash loop on mobile). The fix was to add a handler that throws away the dead connection instead of killing the process.
Same origin (Neon sleeps/recycles anything idle), different symptom (yours at deploy, mine at runtime). Worth knowing because once you understand why Neon does this, both make sense.
How to fix yours
Open your Neon dashboard (or the Replit Database tab that links to it).
Find your project’s compute endpoint and enable / resume it (the error literally tells you it’s disabled).
If it was disabled because of a limit or a manual action, resolve that first.
Retry the republish — the diff check should now reach the database.
A method to diagnose this type of bug with the Replit agent
Infrastructure errors (database, deploy, connections) need a slightly different reflex than code bugs. Same steps every time:
1. Read the exact error and decide the layer first. Before touching anything, ask: is this my code or the platform/infra? “Endpoint has been disabled” names an external service (Neon), not your code. Ask the agent: “Which service does this error come from — my app, the database, or the deploy system?”
2. Use which step fails as your map. Build passes but deploy fails at the DB diff → the problem is between the deploy system and the database, not in your code. Tell the agent exactly which step fails; it narrows the search instantly.
3. Have the agent translate the error into plain language. Paste the exact message and ask it to explain what the term means (here: “what is a Neon endpoint, and why would it be disabled?”). Understanding beats guessing.
4. Go to the source-of-truth dashboard. For infra issues, the fix usually lives in the service’s own console (Neon, deployment settings), not in code. The agent can tell you what to change, but it can’t click your Neon dashboard for you.
5. Apply the fix at the right layer, then re-run only the failing step. Don’t rebuild everything — retry the exact step that broke (republish) to confirm.
6. Prevent recurrence. Ask the agent: “Why did this go idle/disabled, and how do I make my app resilient to it?” (For me, that’s how I learned my pool needed an error handler.)
The big lesson: code bugs are the agent’s home turf; infra/platform bugs are diagnosed with the agent but fixed in the service’s dashboard. Knowing which is which saves hours.
Good luck — enable the endpoint and your republish should go through.