Uploaded image for project: 'OpenICF'
  1. OpenICF
  2. OPENICF-1596

PSQLException: FATAL: terminating connection due to idle-in-transaction timeout



    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • PostgreSQL >= 9.6 w/idle_in_transaction_session_timeout enabled
    • 2


      PostgreSQL 9.6 introduces a new idle_in_transaction_session_timeout configuration property which when set will:

      Terminate any session with an open transaction that has been idle for longer than the specified duration in milliseconds. This allows any locks held by that session to be released and the connection slot to be reused; it also allows tuples visible only to this transaction to be vacuumed. See Section 24.1 for more details about this.

      Within the current Database Table Connector implementation, both the Sync and Query operations iterate over the JDBC ResultSet, handing off individual results to the target Handler within the scope of the active SQL Transaction. This handling of results within an active transaction may result in exceeding the configured idle_in_transaction_session_timeout if the number of results returned by the operation exceeds the configured size of the ICF BufferedResultsHandler buffer.

      Upon exceeding the idle_in_transaction_session_timeout, the active session is silently terminated which ultimately results in the failure of the overall LiveSync operation once all results have been processed and the transaction is committed. The failure occurs as a result of a SQLException thrown during the call to commit() as the underlying connection has been closed.


          Issue Links



              cgdrake Chris Drake
              cgdrake Chris Drake
              Son Nguyen Son Nguyen
              0 Vote for this issue
              3 Start watching this issue