<?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>question Single Query (with 253 Plan Fragments) Causes TPC Connection Issue in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Single-Query-with-253-Plan-Fragments-Causes-TPC-Connection/m-p/43930#M37813</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a single query&amp;nbsp;consists of 253 plan fragments on a 43 clusters. We encountered an issue saying that "couldn't get a client for cdh-datanode-010.xxxxx.storage:22000" in the middle of the execution. I'm wondering is this because of the dedicated tcp&amp;nbsp;connections required by each channel? The query consists of 212 HDFS SCAN NODE on each impalad node. Each of them is broadcasting/shuffling data to other 42 nodes, which requires, I think, 42 channels/data stream sender/scan node/per server. If each of them requires a tcp connection, then it would be&amp;nbsp;377496 connections all together, is this correct???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is the case, would you have any optimization suggestion to this query?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We only have a partial profile for this query as it stops in the middle of execution&lt;/P&gt;&lt;P&gt;&lt;A href="https://dl.dropboxusercontent.com/u/13650224/impala_sql_profile_2d42c9a80da6e983_faf86d52fb685b80.sql" target="_blank"&gt;https://dl.dropboxusercontent.com/u/13650224/impala_sql_profile_2d42c9a80da6e983_faf86d52fb685b80.sql&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any comments and suggestion will be appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are using Impala 2.3&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 10:34:47 GMT</pubDate>
    <dc:creator>epstvxj</dc:creator>
    <dc:date>2022-09-16T10:34:47Z</dc:date>
    <item>
      <title>Single Query (with 253 Plan Fragments) Causes TPC Connection Issue</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Single-Query-with-253-Plan-Fragments-Causes-TPC-Connection/m-p/43930#M37813</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a single query&amp;nbsp;consists of 253 plan fragments on a 43 clusters. We encountered an issue saying that "couldn't get a client for cdh-datanode-010.xxxxx.storage:22000" in the middle of the execution. I'm wondering is this because of the dedicated tcp&amp;nbsp;connections required by each channel? The query consists of 212 HDFS SCAN NODE on each impalad node. Each of them is broadcasting/shuffling data to other 42 nodes, which requires, I think, 42 channels/data stream sender/scan node/per server. If each of them requires a tcp connection, then it would be&amp;nbsp;377496 connections all together, is this correct???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is the case, would you have any optimization suggestion to this query?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We only have a partial profile for this query as it stops in the middle of execution&lt;/P&gt;&lt;P&gt;&lt;A href="https://dl.dropboxusercontent.com/u/13650224/impala_sql_profile_2d42c9a80da6e983_faf86d52fb685b80.sql" target="_blank"&gt;https://dl.dropboxusercontent.com/u/13650224/impala_sql_profile_2d42c9a80da6e983_faf86d52fb685b80.sql&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any comments and suggestion will be appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are using Impala 2.3&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:34:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Single-Query-with-253-Plan-Fragments-Causes-TPC-Connection/m-p/43930#M37813</guid>
      <dc:creator>epstvxj</dc:creator>
      <dc:date>2022-09-16T10:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Single Query (with 253 Plan Fragments) Causes TPC Connection Issue</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Single-Query-with-253-Plan-Fragments-Causes-TPC-Connection/m-p/43955#M37814</link>
      <description>&lt;P&gt;This is a known issue that we're actively working on:&amp;nbsp;&lt;A href="https://issues.cloudera.org/browse/IMPALA-2567" target="_blank"&gt;https://issues.cloudera.org/browse/IMPALA-2567&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your analysis&amp;nbsp;is accurate. Part of the problem is the number of connections and the other part is the # of threads per connection.&amp;nbsp;You may be able to&amp;nbsp;change some operating system config settings to increase limits here (depending on which limit you're hitting).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order to&amp;nbsp;reduce the # of tcp conncetions required&amp;nbsp;you would either need to reduce the number of fragments or reduce the number of node executing the query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could reduce the # of fragments by&amp;nbsp;breaking up the query into smaller queries. E.g. creating temporary tables with the results of some of the subqueries.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You could also try executing the query on a single node by setting num_nodes=1 if the data size is small enough that this makes sense. I suspect your query is too large for that to work, but&amp;nbsp;it's hard to tell (that's a huge query plan!)&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 16:54:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Single-Query-with-253-Plan-Fragments-Causes-TPC-Connection/m-p/43955#M37814</guid>
      <dc:creator>Tim Armstrong</dc:creator>
      <dc:date>2016-08-15T16:54:23Z</dc:date>
    </item>
  </channel>
</rss>

