<?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 What is meant to clean up dispatch? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-meant-to-clean-up-dispatch/m-p/79128#M20018</link>
    <description>&lt;P&gt;Splunk recently fell over because the dispatch directory (on an ext2 filesystem) hit 32000 directory entries, so the OS would not let Splunk create any more, and all searches failed.  The jobs dated back over 6 months or so - it looked like no jobs had ever been removed.&lt;/P&gt;

&lt;P&gt;I removed old jobs by hand (find, xargs, rm etc) to free up directory slots, restarted Splunk, and searches started working again.  Almost all of the jobs I had to remove did &lt;EM&gt;not&lt;/EM&gt; have "save" set.&lt;/P&gt;

&lt;P&gt;My question is: surely something (in Splunk) is normally meant to automatically delete old jobs, perhaps once their TTL has expired?  What is meant to do that, and how might I debug the cause of it failing to clean up?&lt;/P&gt;

&lt;P&gt;Sure, I can add a cron to do the find|xargs|rm dance to delete old jobs, but that feels very wrong.  Splunk is meant to take care of this, no?&lt;/P&gt;

&lt;P&gt;This seems to be related to&lt;BR /&gt;
&lt;A href="http://splunk-base.splunk.com/answers/28390/minimum-free-disk-space-1000mb-reached-for-optsplunkvarrundispatch"&gt;http://splunk-base.splunk.com/answers/28390/minimum-free-disk-space-1000mb-reached-for-optsplunkvarrundispatch&lt;/A&gt;&lt;BR /&gt;
and &lt;A href="http://splunk-base.splunk.com/answers/29551/too-many-search-jobs-found-in-the-dispatch-directory"&gt;http://splunk-base.splunk.com/answers/29551/too-many-search-jobs-found-in-the-dispatch-directory&lt;/A&gt;&lt;BR /&gt;
but they don't seem to answer it.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Sep 2011 10:12:23 GMT</pubDate>
    <dc:creator>djce</dc:creator>
    <dc:date>2011-09-21T10:12:23Z</dc:date>
    <item>
      <title>What is meant to clean up dispatch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-meant-to-clean-up-dispatch/m-p/79128#M20018</link>
      <description>&lt;P&gt;Splunk recently fell over because the dispatch directory (on an ext2 filesystem) hit 32000 directory entries, so the OS would not let Splunk create any more, and all searches failed.  The jobs dated back over 6 months or so - it looked like no jobs had ever been removed.&lt;/P&gt;

&lt;P&gt;I removed old jobs by hand (find, xargs, rm etc) to free up directory slots, restarted Splunk, and searches started working again.  Almost all of the jobs I had to remove did &lt;EM&gt;not&lt;/EM&gt; have "save" set.&lt;/P&gt;

&lt;P&gt;My question is: surely something (in Splunk) is normally meant to automatically delete old jobs, perhaps once their TTL has expired?  What is meant to do that, and how might I debug the cause of it failing to clean up?&lt;/P&gt;

&lt;P&gt;Sure, I can add a cron to do the find|xargs|rm dance to delete old jobs, but that feels very wrong.  Splunk is meant to take care of this, no?&lt;/P&gt;

&lt;P&gt;This seems to be related to&lt;BR /&gt;
&lt;A href="http://splunk-base.splunk.com/answers/28390/minimum-free-disk-space-1000mb-reached-for-optsplunkvarrundispatch"&gt;http://splunk-base.splunk.com/answers/28390/minimum-free-disk-space-1000mb-reached-for-optsplunkvarrundispatch&lt;/A&gt;&lt;BR /&gt;
and &lt;A href="http://splunk-base.splunk.com/answers/29551/too-many-search-jobs-found-in-the-dispatch-directory"&gt;http://splunk-base.splunk.com/answers/29551/too-many-search-jobs-found-in-the-dispatch-directory&lt;/A&gt;&lt;BR /&gt;
but they don't seem to answer it.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2011 10:12:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-meant-to-clean-up-dispatch/m-p/79128#M20018</guid>
      <dc:creator>djce</dc:creator>
      <dc:date>2011-09-21T10:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: What is meant to clean up dispatch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-meant-to-clean-up-dispatch/m-p/79129#M20019</link>
      <description>&lt;P&gt;What version are you running? We just started seeing this message after upgrading the 4.2.4 which we did to help resolve a Web UI stability problem (which it did resolve, thank you.) And what is your 'find' command structure? I have tried the following but it does not work if I use anything less than 5 for the -mtime parameter:&lt;/P&gt;

&lt;P&gt;find /$SPLUNK_HOME/var/run/splunk/dispatch -mtime +2 -exec rm -R {} \;&lt;/P&gt;

&lt;P&gt;There are also a lot of "session-*" files in the $SPLUNK_HOME/var/run/splunk/ directory, many with a matching, empty ".lock" file. What are these and can I get rid of these?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2011 12:26:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-meant-to-clean-up-dispatch/m-p/79129#M20019</guid>
      <dc:creator>rgcurry</dc:creator>
      <dc:date>2011-11-18T12:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: What is meant to clean up dispatch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-meant-to-clean-up-dispatch/m-p/79130#M20020</link>
      <description>&lt;P&gt;We're on version 4.2.1.&lt;/P&gt;

&lt;P&gt;The "find" I used to manually zap these jobs was as follows:&lt;/P&gt;

&lt;P&gt;cd var/run/splunk/dispatch/&lt;BR /&gt;
find . -maxdepth 1 -name '[0-9]*' -mtime +7 | while read job ; do if [ ! -e "$job/save" ] ; then rm -rfv $job ; fi ; done&lt;/P&gt;</description>
      <pubDate>Sun, 20 Nov 2011 10:47:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-meant-to-clean-up-dispatch/m-p/79130#M20020</guid>
      <dc:creator>djce</dc:creator>
      <dc:date>2011-11-20T10:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: What is meant to clean up dispatch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-meant-to-clean-up-dispatch/m-p/79131#M20021</link>
      <description>&lt;P&gt;see this answer &lt;A href="http://splunk-base.splunk.com/answers/29551/too-many-search-jobs-found-in-the-dispatch-directory"&gt;http://splunk-base.splunk.com/answers/29551/too-many-search-jobs-found-in-the-dispatch-directory&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;./splunk cmd splunkd clean-dispatch&lt;/P&gt;

&lt;P&gt;usage: splunkd clean-dispatch '&lt;DESTINATION directory="" where="" to="" move="" jobs=""&gt;' '&lt;LATEST job="" mod="" time=""&gt;'&lt;BR /&gt;
example: splunkd clean-dispatch /tmp/old-dispatch-jobs/ -1month&lt;BR /&gt;
example: splunkd clean-dispatch /tmp/old-dispatch-jobs/ -10d@d&lt;BR /&gt;
example: splunkd clean-dispatch /tmp/old-dispatch-jobs/ 2011-06-01T12:34:56.000-07:00&lt;/LATEST&gt;&lt;/DESTINATION&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2012 23:54:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-meant-to-clean-up-dispatch/m-p/79131#M20021</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2012-10-08T23:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: What is meant to clean up dispatch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-meant-to-clean-up-dispatch/m-p/79132#M20022</link>
      <description>&lt;P&gt;I've got a problem with dispatch filling up but what is provided here is NOT a solution. My dispatch directory keeps getting 5-10 new directories each minute. My only saved searches are scheduled for once/day yet I keep getting dispatch is full. I'm currently at 1400 just today and rising. Running splunkd clean-dispatch or some convoluted 'rm' process is NOT solving the root issue of why it fills up in the first place. Can anyone point to what to look for why so many directories are being created and why there is no automatic reaper to clean this out properly?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 18:30:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-meant-to-clean-up-dispatch/m-p/79132#M20022</guid>
      <dc:creator>d3</dc:creator>
      <dc:date>2013-08-28T18:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: What is meant to clean up dispatch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-meant-to-clean-up-dispatch/m-p/79133#M20023</link>
      <description>&lt;P&gt;What is the root cause of the directory filling up? Going in once a week to clean it manually seems ridiculous to me.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2016 12:58:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-meant-to-clean-up-dispatch/m-p/79133#M20023</guid>
      <dc:creator>nmaiorana</dc:creator>
      <dc:date>2016-04-19T12:58:02Z</dc:date>
    </item>
  </channel>
</rss>

