<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>KB-1143 Archive process script's search fails when searching through a large number of files</title><link>https://community.appian.com/support/w/kb/363/kb-1143-archive-process-script-s-search-fails-when-searching-through-a-large-number-of-files</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>KB-1143 Archive process script's search fails when searching through a large number of files</title><link>https://community.appian.com/support/w/kb/363/kb-1143-archive-process-script-s-search-fails-when-searching-through-a-large-number-of-files</link><pubDate>Fri, 24 Feb 2017 16:20:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:aeb728ec-f594-4b40-8d02-46b1b7fdf28b</guid><dc:creator>Nick Vigilante</dc:creator><comments>https://community.appian.com/support/w/kb/363/kb-1143-archive-process-script-s-search-fails-when-searching-through-a-large-number-of-files#comments</comments><description>Current Revision posted to Appian Knowledge Base by Nick Vigilante on 2/24/2017 4:20:40 PM&lt;br /&gt;
&lt;div class="row content_container"&gt;
&lt;h2 id="symptoms"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;When attempting to search for archived processes with the archive script on a system with a large number of archived instances (over 100,000), it may fail. You will see the following error with the script&lt;/p&gt;
&lt;pre&gt; ./archiveprocess.sh search -pmid ##SOME PARAMETER## -parchived ##SOME PARAMETER

The command run for a long while then produce the following output :
K 3.3 2009-08-26 Copyright (C) 1993-2009 Kx Systems
l64 2CPU 2 TEST


Called with parameters: search -pmuuid ##SOME PARAMETER## -parchived ##SOME PARAMETER
Searching...

./archiveprocess.sh: line 13: Killed $APPIAN_EXEC archiveprocess $ARGS
&lt;/pre&gt;
&lt;h2 id="cause"&gt;Cause&lt;/h2&gt;
&lt;p&gt;The script&amp;#39;s search functionality is resource intensive and may not complete when there are a large number of archived processes in the file system.&lt;/p&gt;
&lt;h2 id="action"&gt;Action&lt;/h2&gt;
&lt;p&gt;Instead of using the search functionality from the script, it will be easier to simply search from the file system. You would do this by going to the archived-process directory (usually &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/archived-process&lt;/code&gt;) and running a find command with the right parameters. Since the pmuuid and time are a part of the archived files&amp;rsquo; names, it&amp;rsquo;s a lot easier to find the file using a find command. An example of such a command is shown below,&lt;/p&gt;
&lt;pre&gt;find . *0002dc8b-ea5b-8000-f92f-7f0000014e7a*2016* -print
&lt;/pre&gt;
&lt;p&gt;Another tip is to use the file and pid (the part after the last underscore in the name) parameters when attempting to unarchive processes because they produce a unique combination. If you have a large set, it would be quicker to write a small bash to iterate through the names. Keep in mind that unarchiving is a resource intensive process and should be done in small batches and off-hours.&lt;/p&gt;
&lt;h2 id="affected-versions"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to all versions of Appian.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Last Reviewed:&amp;nbsp;February 2017&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: administration, processes, scripts&lt;/div&gt;
</description></item></channel></rss>