This post is regarding a JDBC error cccurred due to an enabled session_timeout. Let's see below how to fix this.
Symptom
The following message is displayed when COPY is executed through JDBC:
org.postgresql.util.PSQLException: Database connection failed when starting copy
at org.postgresql.core.v3.QueryExecutorImpl.startCopy(QueryExecutorImpl.java:804)
at org.postgresql.copy.CopyManager.copyIn(CopyManager.java:52)
at org.postgresql.copy.CopyManager.copyIn(CopyManager.java:161)
at org.postgresql.copy.CopyManager.copyIn(CopyManager.java:146)
at copy.main(copy.java:95)
Caused by: java.io.EOFException
at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:284)
at
org.postgresql.core.v3.QueryExecutorImpl.processCopyResults(QueryExecutorImpl.java
:1008)
at org.postgresql.core.v3.QueryExecutorImpl.startCopy(QueryExecutorImpl.java:802)
... 4 more
Cause analysis
In C80, session_timeout=10min is set by default. In this case, the database is automatically disconnected if the connection is idle for more than 10 minutes. Connect to the cluster and check the capacity of the concurrent queue.
show session_timeout;
Solution
Log in to a node as user omm and disable session_timeout.
source/opt/huawei/Bigdata/mppdb/.mppdbgs_profile
gs_guc reload -N all -I all -Z coordinator -c "session_timeout=0"