Community Articles

Find and share helpful community-sourced technical articles.
Celebrating as our community reaches 100,000 members! Thank you!
Labels (1)
SYMPTOMS: Sometimes the Hive CLI hangs and the gives no response. At the same time, the /var/log/hive/hivemetastore.log reports timeouts
ERROR [<hostname>-47]: txn.TxnHandler ( - There is a problem with aconnection from the pool, retrying(rc=9): Timed out waiting for a free available connection.
java.sql.SQLException: Timed out waiting for a free available connection.

ROOT CAUSE: The Hive Metastore service is waiting for the database connections to get free. At the time of error, not enough concurrent connections were available.

RESOLUTION: (Note: This is for mysql DB only).

To fix this problem, the number of max database connection should be increased.

1. Open the /etc/my.cnf in the text editor.

vi /etc/my.cnf

2. Under [mysqld] section, add:

max_connections = 250

3. Save the file and restart the mysqld service

service mysqld restart
0 Kudos