the error "This connection has been closed." will occured using PostgreSQL Connector

Hello,

I am working on a workflow in KNIME (the attached file "my_workflow_2hours.PNG") 
where the process is running for more than two hours.

I encounters an error as detailed in the bottom line knime.log: "This connection has been closed."
(the corresponding line is including "AbstractJdbc2Connection.checkClosed.").

I have changed the value in the attached file preferences_kneme_databases.PNG, but it does not improve.

Is there another workaround?

Thanks,

Hiro.

------------------------

knime.log:

2016-10-11 13:07:07,128 : INFO  : main : NodeLogger :  :  : # Welcome to the KNIME Analytics Platform v3.2.2.v201609201941 (Build August 19, 2016)  #
2016-10-11 13:07:07,128 : INFO  : main : NodeLogger :  :  : # Based on Eclipse, http://www.eclipse.org                                              #
2016-10-11 13:07:07,128 : INFO  : main : NodeLogger :  :  : #                                                                                       #
2016-10-11 13:07:07,128 : INFO  : main : NodeLogger :  :  : #########################################################################################
2016-10-11 13:07:07,128 : INFO  : main : NodeLogger :  :  : #                                                                                       #
2016-10-11 13:07:07,128 : INFO  : main : NodeLogger :  :  : # Copyright by KNIME GmbH, Konstanz, Germany and others.                                #
2016-10-11 13:07:07,128 : INFO  : main : NodeLogger :  :  : # Website: http://www.knime.org                                                         #
2016-10-11 13:07:07,128 : INFO  : main : NodeLogger :  :  : # E-mail: contact@knime.org                                                             #
2016-10-11 13:07:07,128 : INFO  : main : NodeLogger :  :  : #                                                                                       #
2016-10-11 13:07:07,128 : INFO  : main : NodeLogger :  :  : #########################################################################################
2016-10-11 13:07:07,128 : INFO  : main : NodeLogger :  :  : # For more details see the KNIME log file:                                              #
2016-10-11 13:07:07,128 : INFO  : main : NodeLogger :  :  : # C:\Users\xxxxxxxxxxx\Documents\knime_root\xxxxxxxxxxxxxxx\.metadata\knime\knime.log
2016-10-11 13:07:07,128 : INFO  : main : NodeLogger :  :  : #---------------------------------------------------------------------------------------#
2016-10-11 13:07:07,130 : INFO  : main : NodeLogger :  :  : # logging date=Tue Oct 11 13:07:07 JST 2016
2016-10-11 13:07:07,130 : INFO  : main : NodeLogger :  :  : # java.version=1.8.0_60
2016-10-11 13:07:07,130 : INFO  : main : NodeLogger :  :  : # java.vm.version=25.60-b23
2016-10-11 13:07:07,130 : INFO  : main : NodeLogger :  :  : # java.vendor=Oracle Corporation
2016-10-11 13:07:07,131 : INFO  : main : NodeLogger :  :  : # os.name=Windows 7
2016-10-11 13:07:07,131 : INFO  : main : NodeLogger :  :  : # os.arch=amd64
2016-10-11 13:07:07,131 : INFO  : main : NodeLogger :  :  : # number of CPUs=8
2016-10-11 13:07:07,131 : INFO  : main : NodeLogger :  :  : # assertions=off
2016-10-11 13:07:07,131 : INFO  : main : NodeLogger :  :  : # host=MICROAD-PC-546
2016-10-11 13:07:07,133 : INFO  : main : NodeLogger :  :  : # username=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2016-10-11 13:07:07,133 : INFO  : main : NodeLogger :  :  : # max mem=7282MB
2016-10-11 13:07:07,134 : INFO  : main : NodeLogger :  :  : # application=org.knime.product.KNIME_APPLICATION
2016-10-11 13:07:07,135 : INFO  : main : NodeLogger :  :  : # ID=01-804c84b154a894a4
2016-10-11 13:07:07,135 : INFO  : main : NodeLogger :  :  : #########################################################################################
...
(snip)
...

2016-10-20 17:02:42,647 : DEBUG : KNIME-Worker-74 : DatabaseConnectionSettings : Database Connection Table Writer : 2:10 : Executing SQL statement "CREATE TABLE ....
...
(snip)
...
....id, xxxxx_id, xxx_id, xxx_id, year, month, week, date) table_549347833) t)"
2016-10-20 17:03:07,654 : DEBUG : main : NodeContainerEditPart :  :  : Database Connection Table Writer 2:10 (EXECUTING)
2016-10-20 17:03:57,358 : DEBUG : main : NodeContainerEditPart :  :  : Database Table Selector 2:2 (EXECUTED)
2016-10-20 17:32:43,537 : DEBUG : KNIME-Worker-74 : DatabaseConnectionSettings : Database Connection Table Writer : 2:10 : Caught another SQL exception while rolling back transaction: 縺薙�ョ謗・邯壹�ッ譌「縺ォ髢峨§繧峨l縺ヲ縺�縺セ縺吶��
org.postgresql.util.PSQLException: 縺薙�ョ謗・邯壹�ッ譌「縺ォ髢峨§繧峨l縺ヲ縺�縺セ縺吶��
    at org.postgresql.jdbc2.AbstractJdbc2Connection.checkClosed(AbstractJdbc2Connection.java:820)
    at org.postgresql.jdbc2.AbstractJdbc2Connection.getAutoCommit(AbstractJdbc2Connection.java:781)
    at org.knime.core.node.port.database.DatabaseConnectionSettings.execute(DatabaseConnectionSettings.java:611)
    at org.knime.base.node.io.database.DBConnectionWriterNodeModel.execute(DBConnectionWriterNodeModel.java:107)
    at org.knime.core.node.NodeModel.executeModel(NodeModel.java:566)
    at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1128)
    at org.knime.core.node.Node.execute(Node.java:915)
    at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:556)
    at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
    at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:179)
    at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:110)
    at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:328)
    at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:204)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
    at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)
2016-10-20 17:32:43,538 : DEBUG : KNIME-Worker-74 : Database Connection Table Writer : Database Connection Table Writer : 2:10 : reset
2016-10-20 17:32:43,538 : ERROR : KNIME-Worker-74 : Database Connection Table Writer : Database Connection Table Writer : 2:10 : Execute failed: An I/O error occurred while sending to the backend.
2016-10-20 17:32:43,538 : DEBUG : KNIME-Worker-74 : Database Connection Table Writer : Database Connection Table Writer : 2:10 : Execute failed: An I/O error occurred while sending to the backend.
org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend.
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:283)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:570)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:406)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:398)
    at org.knime.core.node.port.database.DatabaseConnectionSettings.execute(DatabaseConnectionSettings.java:605)
    at org.knime.base.node.io.database.DBConnectionWriterNodeModel.execute(DBConnectionWriterNodeModel.java:107)
    at org.knime.core.node.NodeModel.executeModel(NodeModel.java:566)
    at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1128)
    at org.knime.core.node.Node.execute(Node.java:915)
    at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:556)
    at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
    at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:179)
    at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:110)
    at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:328)
    at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:204)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
    at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)
Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:209)
    at java.net.SocketInputStream.read(SocketInputStream.java:141)
    at org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:143)
    at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:112)
    at org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:71)
    at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:282)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1803)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
    ... 18 more

 

It looks like the database is forcefully closing the connection while the query is still running. It can also be a network component between you and the database server. I don't think there is much you can do about it except maybe changing some magic parameters on the database side.

> It can also be a network component between you and the database server.

The cause was in the network component, where I was confirmed.

Now, I have done all the things well.

Thanks so much,

Hiro.