SQL Error: 0, SQLState: 08006

I have a web app with a sleeping connection. application connects to PostgreSQL db. Several times I get below exceptions in my journals.

Caused by: **org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.**
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:283)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:252)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.geotools.jdbc.JDBCFeatureReader.<init>(JDBCFeatureReader.java:150)
at org.geotools.jdbc.JDBCFeatureSource.getReaderInternal(JDBCFeatureSource.java:567)
... 101 more
**Caused by: java.io.EOFException**
at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:261)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1620)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)






Caused by: org.postgresql.util.PSQLException: **An I/O error occured while sending to the backend.**
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:283)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:252)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.geotools.jdbc.JDBCFeatureReader.<init>(JDBCFeatureReader.java:150)
at org.geotools.jdbc.JDBCFeatureSource.getReaderInternal(JDBCFeatureSource.java:567)
... 101 more
**Caused by: java.net.SocketException: Connection reset**
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:135)
at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:104)
at org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:73)
at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:259)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1620)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)

What could be the problem. Is there anything I need to change in my hibernation configuration files or any code problems. Please give me your suggestions?

find the sleep configuration below

<property name="hibernate.c3p0.min_size">5</property>
    <property name="hibernate.c3p0.max_size">20</property>
    <property name="hibernate.c3p0.timeout">5000</property>
    <property name="hibernate.c3p0.max_statements">0</property>
    <property name="hibernate.c3p0.idle_test_period">3000</property>

find below my postgreSQL logs

2014-02-19 07:22:35 IST LOG:  server process (PID 74813) was terminated by signal 6: Aborted
2014-02-19 07:22:35 IST LOG:  terminating any other active server processes
2014-02-19 07:22:35 IST WARNING:  terminating connection because of crash of another server process
2014-02-19 07:22:35 IST DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2014-02-19 07:22:35 IST HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2014-02-19 07:22:35 IST WARNING:  terminating connection because of crash of another server process
2014-02-19 07:22:35 IST DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2014-02-19 07:22:35 IST HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2014-02-19 07:22:35 IST LOG:  all server processes terminated; reinitializing
2014-02-19 07:22:35 IST LOG:  database system was interrupted; last known up at 2014-02-19 07:22:29 IST
2014-02-19 07:22:35 IST LOG:  database system was not properly shut down; automatic recovery in progress
2014-02-19 07:22:35 IST LOG:  record with zero length at 0/16D89BB0
2014-02-19 07:22:35 IST LOG:  redo is not required
2014-02-19 07:22:35 IST LOG:  autovacuum launcher started
2014-02-19 07:22:35 IST LOG:  database system is ready to accept connections


2014-02-19 11:17:59 IST LOG:  unexpected EOF on client connection
2014-02-19 11:17:59 IST LOG:  unexpected EOF on client connection
2014-02-19 11:17:59 IST LOG:  unexpected EOF on client connection
2014-02-19 11:17:59 IST LOG:  unexpected EOF on client connection
2014-02-19 11:17:59 IST LOG:  unexpected EOF on client connection
2014-02-19 11:17:59 IST LOG:  unexpected EOF on client connection
2014-02-19 11:17:59 IST LOG:  unexpected EOF on client connection
2014-02-19 11:17:59 IST LOG:  unexpected EOF on client connection

My server OS - Red Hat Enterprise Linux 6 64-bit  and postgreSQL - postgreSQL 9.1

+3
source share
2 answers

Ok, this is interesting:

2014-02-19 07:22:35 IST LOG: the server process (PID 74813) was interrupted by signal 6: Aborted

PostgreSQL. , 6 (SIGABRT) , , - , .

PostgreSQL, , .

( - , SO ):

log_statement = all log_line_prefix, , , backend pid ID . PostgreSQL, . , , , . , , .

debuginfo PostgreSQL. , , , , , , . - OS/distro specific, , ; . Google.

+5

postgresql, connection_failure. ,

  • .
  • , , postgressql.
0

All Articles