cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

org.apache.hadoop.hive.ql.metadata.HiveException: MetaException

rohith_23
New Contributor

Hi Data Enthusiasts,

I have been facing few errors in SQL warehouse for quiet a long time and its happening pretty randomly.

We checked query runs and captured the errors below.
I believe this is something to do with hive. And I am facing this when there are lot of queries fired simultaneously.

Thanks in advance ! Any help is really appreciable!!

Error 1:  org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: org.apache.thrift.transport.TTransportException java.net.SocketTimeoutException: Read timed out)

Error 2: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: org.apache.thrift.transport.TTransportException java.net.SocketException: Connection reset)

Error 3: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: org.apache.thrift.transport.TTransportException java.net.SocketException: Connection reset by peer)

#databricks #warehouse #hive

 

 

2 REPLIES 2

Khaja_Zaffer
Contributor

Hello @rohith_23 

Good day!!

Thank you for sharing the details. 

 

These errors are typically related to connectivity issues between your Databricks SQL warehouse and the Hive Metastore (HMS), often triggered by high concurrency overwhelming the metastore's connection handling.
 
1. Increase Client Socket Timeout:
spark.hadoop.hive.metastore.client.socket.timeout 1800
2. Increase HMS Client Pool Size:
spark.databricks.hive.metastore.client.pool.size 32
3. Migrate to Unity Catalog (Long-Term Fix)
Hive Metastore is legacy and prone to these scalability issues. Switch to Unity Catalog (UC), which is Databricks' modern metadata layer—it's more reliable, supports fine-grained access, and avoids HMS bottlenecks.
how to migrate to unity catalog: 
 
I hope this helps. 
 
Thank you. 

rohith_23
New Contributor

Hi @Khaja_Zaffer 
Thank you for quick response !
How can I tune this configurations on SQL warehouse. I already tried.
It doesn't allow any tunings at SQL warehouse. But I can do it on all purpose cluster.
Kindly do the needful ! Please find the error message.

[CONFIG_NOT_AVAILABLE] Configuration spark.hadoop.hive.metastore.client.socket.timeout is not available. SQLSTATE: 42K0I

[CONFIG_NOT_AVAILABLE] Configuration spark.databricks.hive.metastore.client.pool.size is not available. SQLSTATE: 42K0I

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now