Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-22530

Connection pool timeout in TxnHandler.java is hardcoded to 30 secs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • None
    • None
    • Locking
    • None

    Description

      If the time to acquire locks gets long enough, we can end up running into the time limit for acquiring DB connections in TxnHandler:

      2019-07-23 11:49:54,285 ERROR [HiveServer2-Background-Pool: Thread-3881156]: operation.Operation (SQLOperation.java:run(258)) - Error running hive query:
      org.apache.hive.service.cli.HiveSQLException: Error while processing statement: FAILED: Error in acquiring locks: Error communicating with the metastore
      
      Caused by: org.apache.hadoop.hive.ql.lockmgr.LockException: Error communicating with the metastore
      Caused by: MetaException(message:Unable to update transaction database org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
      

      This appears to be hard-coded to 30 seconds here: https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java#L2359
      It may sense to either make this configurable or eliminate the timeout altogether.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jdere Jason Dere
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: