<?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 Why is there forceful termination of the search process when using stats dc()? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-there-forceful-termination-of-the-search-process-when/m-p/351798#M104123</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;*Forcefully terminated search process with sid=1517416303.2383_ABC123 since its physical memory usage (36521.336000 MB) has exceeded the physical memory threshold specified in limits.conf/search_process_memory_usage_threshold (32768.000000 MB).*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Does anyone have a solution for this issue where using stats dc(field) results in forceful termination of the search?  I cannot raise the memory allowance any higher (currently 32Gb) which risks our searcher going down when a user runs this type of query.  &lt;/P&gt;

&lt;P&gt;Obviously, it is caused by higher distinct counts but it is nothing unreasonable about the query.  &lt;/P&gt;

&lt;P&gt;Surely, Splunk has seen this many times and has a solution?&lt;BR /&gt;
Is there some additional configuration that will allow us to workaround the high memory consumption for this type of search?&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jan 2018 18:07:05 GMT</pubDate>
    <dc:creator>the_wolverine</dc:creator>
    <dc:date>2018-01-31T18:07:05Z</dc:date>
    <item>
      <title>Why is there forceful termination of the search process when using stats dc()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-there-forceful-termination-of-the-search-process-when/m-p/351798#M104123</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;*Forcefully terminated search process with sid=1517416303.2383_ABC123 since its physical memory usage (36521.336000 MB) has exceeded the physical memory threshold specified in limits.conf/search_process_memory_usage_threshold (32768.000000 MB).*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Does anyone have a solution for this issue where using stats dc(field) results in forceful termination of the search?  I cannot raise the memory allowance any higher (currently 32Gb) which risks our searcher going down when a user runs this type of query.  &lt;/P&gt;

&lt;P&gt;Obviously, it is caused by higher distinct counts but it is nothing unreasonable about the query.  &lt;/P&gt;

&lt;P&gt;Surely, Splunk has seen this many times and has a solution?&lt;BR /&gt;
Is there some additional configuration that will allow us to workaround the high memory consumption for this type of search?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 18:07:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-there-forceful-termination-of-the-search-process-when/m-p/351798#M104123</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2018-01-31T18:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why is there forceful termination of the search process when using stats dc()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-there-forceful-termination-of-the-search-process-when/m-p/351799#M104124</link>
      <description>&lt;P&gt;Can you share your search string? How much data is this searching and for what size time window?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 23:25:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-there-forceful-termination-of-the-search-process-when/m-p/351799#M104124</guid>
      <dc:creator>davpx</dc:creator>
      <dc:date>2018-01-31T23:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why is there forceful termination of the search process when using stats dc()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-there-forceful-termination-of-the-search-process-when/m-p/351800#M104125</link>
      <description>&lt;P&gt;To reduce DC memory impact you can change &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[stats]
dc_digest_bits=9
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But the result can be approximative =/&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/limitsconf#.5Bstats.7Csistats.5D"&gt;limits.conf reference&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 09:41:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-there-forceful-termination-of-the-search-process-when/m-p/351800#M104125</guid>
      <dc:creator>jeanyvesnolen</dc:creator>
      <dc:date>2018-02-01T09:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Why is there forceful termination of the search process when using stats dc()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-there-forceful-termination-of-the-search-process-when/m-p/351801#M104126</link>
      <description>&lt;P&gt;Yeah, estimate is not ok and in the case where it is estdc can be used.  Depending on the data set, sometimes it works and other times still fails due to splunkd forcefully terminated.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 22:17:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-there-forceful-termination-of-the-search-process-when/m-p/351801#M104126</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2018-02-02T22:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why is there forceful termination of the search process when using stats dc()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-there-forceful-termination-of-the-search-process-when/m-p/351802#M104127</link>
      <description>&lt;P&gt;After dealing with this for a few years, it turns out that when a dc(field) causes out of memory forceful termination, just refactor the query to use :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | stats count by field | stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The tradeoff here is that this type of search will consume more disk, however, a reasonable amount of memory will be consumed which will less likely cause the search to be forcefully terminated due to memory.    The new risk now is possible termination caused by exceeding disk quota allocated for search.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2018 00:50:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-there-forceful-termination-of-the-search-process-when/m-p/351802#M104127</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2018-02-06T00:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: Why is there forceful termination of the search process when using stats dc()?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-there-forceful-termination-of-the-search-process-when/m-p/634219#M220298</link>
      <description>&lt;P&gt;I had the same issue, I used that strat and I ran out of search disk memory quota.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What about the chunk_size parameter? Does it make long DC() searches possible?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 07:57:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-there-forceful-termination-of-the-search-process-when/m-p/634219#M220298</guid>
      <dc:creator>isaiz</dc:creator>
      <dc:date>2023-03-13T07:57:26Z</dc:date>
    </item>
  </channel>
</rss>

