<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/org-apache-hadoop-hive-ql-metadata-hiveexception-metaexception/m-p/133075#M49717</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/185989"&gt;@rohith_23&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;These errors all relate to problems communicating with the Hive Metastore Service (HMS), which is the central component to store metadata (schemas, table locations, column types, etc.) about your tables.&lt;/P&gt;
&lt;P&gt;The core of the issue in all three errors is a transport/network failure between the client (Spark job) and the HMS, specifically involving the Apache Thrift protocol that Hive uses for communication.&lt;/P&gt;
&lt;P&gt;As you mentioned,&lt;SPAN&gt;&amp;nbsp;"I am facing this when there are lot of queries fired simultaneously." the causes are possibly the&amp;nbsp;Metastore Overload due to&amp;nbsp;many concurrent requests (especially complex ones like listing partitions on huge tables). &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SocketException: Connection reset / Connection reset by peer is also seen when Metastore was either too busy to respond in time. (I do not suspect a crash, as it eventually recovers)&lt;/P&gt;
&lt;P&gt;Increasing Timeout may reduce these errors, as the client now waits for a response from the Metastore for longer, allowing more time to process complex requests (e.g., listing many partitions).&amp;nbsp;While increasing the socket timeout can mitigate the client-side issue, it does not resolve underlying server resource limitations or query performance bottlenecks.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I would suggest you to&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;check the monitoring page of the warehouse to see if the clusters were starting or stopping during this time. Check the&amp;nbsp;&lt;/SPAN&gt;Peak query count, running queries, their durations to get more understanding. You may have to size the warehouse according to the query concurrency requests.&lt;/P&gt;
&lt;P&gt;You can try increasing the SocketTimeout Value, in JDBC connections, explicitly set a longer &lt;CODE class="qt3gz9f"&gt;SocketTimeout&lt;/CODE&gt; in the connection URL. For example: jdbc:spark://&amp;lt;server-hostname&amp;gt;:443;HttpPath=&amp;lt;http-path&amp;gt;;TransportMode=http;SSL=1;SocketTimeout=300&lt;/P&gt;
&lt;P&gt;Additionally, these configs are not supported on warehouse as you can see in the error&amp;nbsp;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A class="" href="https://learn.microsoft.com/azure/databricks/error-messages/error-classes#config_not_available" target="_blank" rel="noopener noreferrer nofollow"&gt;CONFIG_NOT_AVAILABLE&lt;/A&gt;]&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Sep 2025 11:51:20 GMT</pubDate>
    <dc:creator>NandiniN</dc:creator>
    <dc:date>2025-09-26T11:51:20Z</dc:date>
    <item>
      <title>org.apache.hadoop.hive.ql.metadata.HiveException: MetaException</title>
      <link>https://community.databricks.com/t5/data-engineering/org-apache-hadoop-hive-ql-metadata-hiveexception-metaexception/m-p/132673#M49593</link>
      <description>&lt;P&gt;Hi Data Enthusiasts,&lt;/P&gt;&lt;P&gt;I have been facing few errors in SQL warehouse for quiet a long time and its happening pretty randomly.&lt;/P&gt;&lt;P&gt;We checked query runs and captured the errors below.&lt;BR /&gt;I believe this is something to do with hive. And I am facing this when there are lot of queries fired simultaneously.&lt;/P&gt;&lt;P&gt;Thanks in advance ! Any help is really appreciable!!&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Error 1:&amp;nbsp; org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: org.apache.thrift.transport.TTransportException java.net.SocketTimeoutException: Read timed out)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Error 2: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: org.apache.thrift.transport.TTransportException java.net.SocketException: Connection reset)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;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)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;#databricks #warehouse #hive&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Sep 2025 12:15:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/org-apache-hadoop-hive-ql-metadata-hiveexception-metaexception/m-p/132673#M49593</guid>
      <dc:creator>rohith_23</dc:creator>
      <dc:date>2025-09-22T12:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException</title>
      <link>https://community.databricks.com/t5/data-engineering/org-apache-hadoop-hive-ql-metadata-hiveexception-metaexception/m-p/132681#M49597</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/185989"&gt;@rohith_23&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good day!!&lt;BR /&gt;&lt;BR /&gt;Thank you for sharing the details.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;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.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;1. Increase Client Socket Timeout&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;spark.hadoop.hive.metastore.client.socket.timeout 1800&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;2.&amp;nbsp;Increase HMS Client Pool Size:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;spark.databricks.hive.metastore.client.pool.size 32&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&lt;A href="https://community.databricks.com/t5/data-engineering/super-slow-sql-queries-on-an-hc-cluster/td-p/19257" target="_blank" rel="noopener"&gt;https://community.databricks.com/t5/data-engineering/super-slow-sql-queries-on-an-hc-cluster/td-p/19257&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;3.&amp;nbsp;Migrate to Unity Catalog (Long-Term Fix)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;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.&lt;/DIV&gt;&lt;DIV&gt;how to migrate to unity catalog:&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="https://docs.databricks.com/aws/en/data-governance/unity-catalog/migrate" target="_blank" rel="noopener"&gt;https://docs.databricks.com/aws/en/data-governance/unity-catalog/migrate&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I hope this helps.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you.&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 22 Sep 2025 12:50:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/org-apache-hadoop-hive-ql-metadata-hiveexception-metaexception/m-p/132681#M49597</guid>
      <dc:creator>Khaja_Zaffer</dc:creator>
      <dc:date>2025-09-22T12:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException</title>
      <link>https://community.databricks.com/t5/data-engineering/org-apache-hadoop-hive-ql-metadata-hiveexception-metaexception/m-p/132786#M49625</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/173840"&gt;@Khaja_Zaffer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thank you for quick response !&lt;BR /&gt;How can I tune this configurations on SQL warehouse. I already tried.&lt;BR /&gt;It doesn't allow any tunings at SQL warehouse. But I can do it on all purpose cluster.&lt;BR /&gt;Kindly do the needful ! Please find the error message.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A class="" href="https://learn.microsoft.com/azure/databricks/error-messages/error-classes#config_not_available" target="_blank" rel="noopener noreferrer"&gt;CONFIG_NOT_AVAILABLE&lt;/A&gt;&lt;SPAN&gt;] Configuration spark.hadoop.hive.metastore.client.socket.timeout is not available. SQLSTATE: 42K0I&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[&lt;A class="" href="https://learn.microsoft.com/azure/databricks/error-messages/error-classes#config_not_available" target="_blank" rel="noopener noreferrer"&gt;CONFIG_NOT_AVAILABLE&lt;/A&gt;] Configuration spark.databricks.hive.metastore.client.pool.size is not available. SQLSTATE: 42K0I&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2025 06:05:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/org-apache-hadoop-hive-ql-metadata-hiveexception-metaexception/m-p/132786#M49625</guid>
      <dc:creator>rohith_23</dc:creator>
      <dc:date>2025-09-23T06:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException</title>
      <link>https://community.databricks.com/t5/data-engineering/org-apache-hadoop-hive-ql-metadata-hiveexception-metaexception/m-p/133075#M49717</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/185989"&gt;@rohith_23&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;These errors all relate to problems communicating with the Hive Metastore Service (HMS), which is the central component to store metadata (schemas, table locations, column types, etc.) about your tables.&lt;/P&gt;
&lt;P&gt;The core of the issue in all three errors is a transport/network failure between the client (Spark job) and the HMS, specifically involving the Apache Thrift protocol that Hive uses for communication.&lt;/P&gt;
&lt;P&gt;As you mentioned,&lt;SPAN&gt;&amp;nbsp;"I am facing this when there are lot of queries fired simultaneously." the causes are possibly the&amp;nbsp;Metastore Overload due to&amp;nbsp;many concurrent requests (especially complex ones like listing partitions on huge tables). &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SocketException: Connection reset / Connection reset by peer is also seen when Metastore was either too busy to respond in time. (I do not suspect a crash, as it eventually recovers)&lt;/P&gt;
&lt;P&gt;Increasing Timeout may reduce these errors, as the client now waits for a response from the Metastore for longer, allowing more time to process complex requests (e.g., listing many partitions).&amp;nbsp;While increasing the socket timeout can mitigate the client-side issue, it does not resolve underlying server resource limitations or query performance bottlenecks.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I would suggest you to&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;check the monitoring page of the warehouse to see if the clusters were starting or stopping during this time. Check the&amp;nbsp;&lt;/SPAN&gt;Peak query count, running queries, their durations to get more understanding. You may have to size the warehouse according to the query concurrency requests.&lt;/P&gt;
&lt;P&gt;You can try increasing the SocketTimeout Value, in JDBC connections, explicitly set a longer &lt;CODE class="qt3gz9f"&gt;SocketTimeout&lt;/CODE&gt; in the connection URL. For example: jdbc:spark://&amp;lt;server-hostname&amp;gt;:443;HttpPath=&amp;lt;http-path&amp;gt;;TransportMode=http;SSL=1;SocketTimeout=300&lt;/P&gt;
&lt;P&gt;Additionally, these configs are not supported on warehouse as you can see in the error&amp;nbsp;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A class="" href="https://learn.microsoft.com/azure/databricks/error-messages/error-classes#config_not_available" target="_blank" rel="noopener noreferrer nofollow"&gt;CONFIG_NOT_AVAILABLE&lt;/A&gt;]&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Sep 2025 11:51:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/org-apache-hadoop-hive-ql-metadata-hiveexception-metaexception/m-p/133075#M49717</guid>
      <dc:creator>NandiniN</dc:creator>
      <dc:date>2025-09-26T11:51:20Z</dc:date>
    </item>
  </channel>
</rss>

