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

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Symptoms

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 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:

1 2 3 4 5 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.

Solution

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

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.