ERROR: Failed to connect to the compute node

I’m getting this error when I try to connect.

org.postgresql.util.PSQLException: ERROR: Failed to connect to the compute node
	at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication( ~[postgresql-42.3.5.jar:42.3.5]
	at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect( ~[postgresql-42.3.5.jar:42.3.5]
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl( ~[postgresql-42.3.5.jar:42.3.5]
	at org.postgresql.core.ConnectionFactory.openConnection( ~[postgresql-42.3.5.jar:42.3.5]
	at org.postgresql.jdbc.PgConnection.<init>( ~[postgresql-42.3.5.jar:42.3.5]
	at org.postgresql.Driver.makeConnection( ~[postgresql-42.3.5.jar:42.3.5]
	at org.postgresql.Driver.connect( ~[postgresql-42.3.5.jar:42.3.5]

The dashboard shows this:

Hi! Can you please check again? We’ve had a few issues with service and rolled back the latest release. Your project should work now.

1 Like

Seems to connect again.
Is this typical?

org.postgresql.util.PSQLException: ERROR: index "idx_record_version" contains unexpected zero page at block 1737
  Hint: Please REINDEX it.

going to try to reindex it.

Looks a lot like this bug: Index corruption after compute crash and restart · Issue #1915 · neondatabase/neon · GitHub. Yeah, reindexing should fix it for now.

PR Init wal redo buffer for fpi by knizhnik · Pull Request #194 · neondatabase/postgres · GitHub to fix the underlying bug was just merged into main. Once that’s deployed to production, it should prevent the error from happening again.


1 Like

I also get “error: Failed to connect to the compute node” after some period of inactivity in my node based pg client.

Are we supposed to re-connect on every request? Or is it ok to hold a persistent but inactive connection?