<?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: Am I bumping into limits issue with subsearch results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93972#M24208</link>
    <description>&lt;P&gt;OK.  Well backing up even further I realized I cant even see why you need a subsearch at all. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt; Check out my updated answer which may help.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Nov 2010 02:32:32 GMT</pubDate>
    <dc:creator>sideview</dc:creator>
    <dc:date>2010-11-25T02:32:32Z</dc:date>
    <item>
      <title>Am I bumping into limits issue with subsearch results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93966#M24202</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have come across an issue similar to this link on Answers: (http://answers.splunk.com/questions/3092/cant-get-past-subsearch-limit).  If I run a simple search (&lt;CODE&gt;sourcetype=smtp | fields messageid&lt;/CODE&gt;) over a set amount of time I get over 15,000 results.  When I change this search to make it a subsearch &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=smtp sourcetype=smtp [search index=smtp sourcetype=smtp rule=x | fields + messageid] | transaction messageid | search NOT ip=127.0.0.1 score&amp;lt;50 | table messageid ip envfrom envto subject&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I end up getting the error "Error in 'UnifiedSearch': Unable to parse the 'The specified search is too large. Please try to simplify your search.' search."&lt;/P&gt;

&lt;P&gt;The contents of the limits.conf are:
[subsearch]
maxout = 100000&lt;/P&gt;

&lt;P&gt;[format]
maxresults = 100000&lt;/P&gt;

&lt;P&gt;After reading the link above I've tried adding the pipe to the subsearch for "format maxresults=20000", but I continue to get this error.&lt;/P&gt;

&lt;P&gt;The server is running Splunk 4.1.5 (64 bit on RHEL 5.4).  What do you think I'm missing?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2010 04:49:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93966#M24202</guid>
      <dc:creator>castle1126</dc:creator>
      <dc:date>2010-11-24T04:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Am I bumping into limits issue with subsearch results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93967#M24203</link>
      <description>&lt;P&gt;Well what's happening is that the 15,000 rows are being turned into a gigantic OR clause for &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;( messageid=A OR messageid=B OR messageid=C OR ....)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and there's 15,000 of them.  Since I dont see a dedup or a stats command in your search you might just be specifying the same messageid's over and over again.   At any rate at some rather large length, splunkd's search language parser gets a bit unhappy. &lt;/P&gt;

&lt;P&gt;Tacking a &lt;CODE&gt;| dedup messageid&lt;/CODE&gt; on the end of the subsearch might help a lot.   Or it might help only a little. Or if they're already unique it wont help at all. &lt;/P&gt;

&lt;P&gt;UPDATE: well from our comments below, you actually do have a ton of messageids,  so you are indeed coming up against the subsearch limits.   An alternative is to have a scheduled search running all the time that puts the rule="x" &lt;/P&gt;

&lt;P&gt;My apologies for my previous suggestions which were off base (and which I've deleted from this answer), and this one may be equally unhelpful,  but it seems you could use stats to create transactions for everything, and then do the rule="x" filtering afterwards.  &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=smtp sourcetype=smtp | stats values(ip) as ip values(envfrom) as envfrom values(envto) as envto values(rule) as rule values(subject) as subject values(score) as score by messageid | search rule="x" NOT ip=127.0.0.1 score&amp;lt;50 | table messageid ip envfrom envto subject&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2010 06:13:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93967#M24203</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2010-11-24T06:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Am I bumping into limits issue with subsearch results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93968#M24204</link>
      <description>&lt;P&gt;Hey Nick, here's the search I was running:&lt;/P&gt;

&lt;P&gt;index=smtp sourcetype=smtp [search index=smtp sourcetype=smtp rule=x | fields + messageid] | transaction messageid | search NOT ip=127.0.0.1 score&amp;lt;50 | table messageid ip envfrom envto subject&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2010 07:54:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93968#M24204</guid>
      <dc:creator>castle1126</dc:creator>
      <dc:date>2010-11-24T07:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Am I bumping into limits issue with subsearch results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93969#M24205</link>
      <description>&lt;P&gt;As you can see from the inner search, I'm only grabbing the messageid where the rule=x.  So the messageid field coming out of the subsearch is unique, so a dedup won't help much.&lt;/P&gt;

&lt;P&gt;One thing I've noticed is that by running this search over a 30 day window (which is what the users here are looking for) causes the error.  But if I break the search down to 4 hours or a day, things run OK.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2010 07:59:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93969#M24205</guid>
      <dc:creator>castle1126</dc:creator>
      <dc:date>2010-11-24T07:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Am I bumping into limits issue with subsearch results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93970#M24206</link>
      <description>&lt;P&gt;No no,  if there's literally only one messageid coming out, but tens of thousands of ROWS with that messageid,  then the dedup will help IMMENSELY.    You're asking splunkd to run a search that's just (messageid=A OR messageid=A OR messageid=A OR messageid=A OR ....).  The dedup should solve your problem completely.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2010 08:27:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93970#M24206</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2010-11-24T08:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Am I bumping into limits issue with subsearch results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93971#M24207</link>
      <description>&lt;P&gt;Hey Nick, what actually is returned from the subsearch is tens of thousands of rows - each row different from the others, with a unique messageid, different timestamps, etc.  So running DEDUP won't help in this situation, unfortunately.&lt;/P&gt;

&lt;P&gt;I'm wondering if I'm relegated to having to run the search over a smaller timeframe.  In my case not run the search over a month window, but run one search for each day of the month.  Not the most efficient way of getting the output, but not sure what else to do.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2010 22:32:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93971#M24207</guid>
      <dc:creator>castle1126</dc:creator>
      <dc:date>2010-11-24T22:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Am I bumping into limits issue with subsearch results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93972#M24208</link>
      <description>&lt;P&gt;OK.  Well backing up even further I realized I cant even see why you need a subsearch at all. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt; Check out my updated answer which may help.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2010 02:32:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93972#M24208</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2010-11-25T02:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Am I bumping into limits issue with subsearch results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93973#M24209</link>
      <description>&lt;P&gt;Nick, unfortunately neither search works for me.  The mail gateway we are using does not put all values in one record/line for me.  Each line has a different value I need (from, to, ip, subject, etc).  The line that has the rule is a line unto itself with no other fields I'm looking for.  So the results of the first search "rule=x" never returns an IP, subject, etc.  This is why I run the initial search as a subsearch, then feed the messageid field back to then do the transaction with which then gives me the fields I'm looking for - from, to, etc.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Nov 2010 03:37:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93973#M24209</guid>
      <dc:creator>castle1126</dc:creator>
      <dc:date>2010-11-27T03:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Am I bumping into limits issue with subsearch results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93974#M24210</link>
      <description>&lt;P&gt;Nick, I've tried using the search that you added to your updated answer, but still no luck.  I do not get the information required.  Any other ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2010 02:40:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Am-I-bumping-into-limits-issue-with-subsearch-results/m-p/93974#M24210</guid>
      <dc:creator>castle1126</dc:creator>
      <dc:date>2010-12-02T02:40:44Z</dc:date>
    </item>
  </channel>
</rss>

