Getting a PSQLException Error 'An IO error occured while sending to the backend' Due to Corrupt Postgres Database

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Postgres database seems to go up and down, leading to the following exceptions in confluence:

org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:216)
at org.postgresql.jdbc2.AbstractJdbc2Connection.executeTransactionCommand(AbstractJdbc2Connection.java:619)
at org.postgresql.jdbc2.AbstractJdbc2Connection.commit(AbstractJdbc2Connection.java:639)
at org.postgresql.jdbc2.AbstractJdbc2Connection.setAutoCommit(AbstractJdbc2Connection.java:602)
at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:268)
at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:293)
at net.sf.hibernate.transaction.JDBCTransaction.toggleAutoCommit(JDBCTransaction.java:104)
at net.sf.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:95)
at org.springframework.orm.hibernate.HibernateTransactionManager.doRollback(HibernateTransactionManager.java:526)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:753)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:730)
...
Caused by: java.io.IOException: Stream closed
at sun.nio.cs.StreamEncoder.ensureOpen(StreamEncoder.java:38)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:151)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)
at org.postgresql.core.PGStream.flush(PGStream.java:531)
at org.postgresql.core.v3.QueryExecutorImpl.sendSync(QueryExecutorImpl.java:674)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:189)
... 89 more

Diagnosis

Obtain the Postgres logs. They contain:

2008-06-22 12:40:45 CEST LOG: transaction ID wrap limit is 2147484146, limited by database "postgres"
2008-06-22 12:42:46 CEST LOG: autovacuum: processing database "confluencedb"
2008-06-22 12:43:09 CEST LOG: server process (PID 12352) was terminated by signal 11
2008-06-22 12:43:09 CEST LOG: terminating any other active server processes
2008-06-22 12:43:09 CEST WARNING: terminating connection because of crash of another server process

Cause

Signal 11 indicates that the Postgres database server is crashing due to bad hardware.

Resolution

Move your Postgres database to another server or identify the faulty hardware. Refer to this third party forum for more information: http://www.nabble.com/terminating-connection-because-of-crash-of-another-server-process-td15468324.html





Last modified on Aug 9, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.