Managing the SP Gatherer’s temp files

While the SharePoint Gatherer is processing files (Office documents, PDFs, etc), it will store them temporarily on local disk.  By default this is in the Temp folder of the user running the OSearch14 service.  It’ll look something like:


And during a large crawl, this directory can at times get quite large.  (as I found out today when a dev server started complaining abou the C drive being full)

Moving it is easy enough and there are 2 ways.

First, update the service application:

$searchapp= Get-SPEnterpriseSearchServiceApplication -identity “FAST Content SSA”
$searchapp.TempPath = “D:\SearchTemp”

Note that setting the path takes effect immediately.  No need to call the $searchapp.Update() method.

UPDATE 5/17/2013
If you use the SSA.TempPath approach and have multiple crawlers, you need to make sure to run the command on each server anyway.

Second approach is to update the registry directly:

$gmpath = ‘HKLM:\Software\Microsoft\Office Server\14.0\Search\Global\Gathering Manager’
Set-ItemProperty -Path $gmpath -Name UseSystemTemp -Value 0
Set-ItemProperty -Path $gmpath -Name TempPath -Value “D:\SearchTemp”
Restart-Service OSearch14

And don’t forget to exclude the new temp folder from any AV scans.

(Thanks Sreedhar)


Comments (4)

  1. E.Issaly says:

    Sadly, it doesnt work on sharepoint 2013, the key gets overwritten 🙂

  2. BistroSHP says:

    Is there a way to change it on Sharepoint 2013?

  3. D. Pellegrini says:

    Does anyone know if the files in the Gthrsvc_OSearch14 folder can be deleted?. I have 64 gigs of flt*.PDF files in this folder. I cannot find anywhere that mentions maintenance of these files – if it is safe to delete older files from this directory. Any
    input on this – greatly appreciated.

  4. Anthony Casillas says:

    I know this post is fairly old and the last comments were months ago, but I wanted to input for any future reference.

    I work on the Search Team for Microsoft SharePoint and there is a way to alter this path, that is supported. I recently had a conversation with someone I know within the Product Team and confirmed we can use this method.

    First is a quick high level flow of what happens at crawl time:

    1. As the mssdmn.exe (gatherer) goes out and fetches content, it will store the data in the TempPath defined at this registry key:

    HKEY_LOCAL_MACHINESOFTWAREMicrosoftOffice Server15.0SearchGlobalGathering ManagerTempPath

    2. The mssearch.exe process will then perform a windows operation to RenameMove the file to the path defined here at this registry key:

    ( Your "guid-crawl-x " will differ )

    HKEY_LOCAL_MACHINESOFTWAREMicrosoftOffice Server15.0SearchComponents52ccea97-e96c-47ca-bcc4-737823da6e85-crawl-0GathererDataPath

    3. Once the Content Processing Component Processes this data, the mssearch should then delete the file from this path.

    We often times see customers install the SearchMS Office Server data on a drive that has inadequate space and we used to not have an easier way to move the path that the mssearchmssdmn temp stores its data to. here is the method to change that path now..

    • $ssa.TempPath cmdlet has been removed
    • To modify application path where mssdmnmssearch writes to, the following registry keys should be modified:

    HKEY_LOCAL_MACHINESOFTWAREMicrosoftOffice Server15.0SearchGlobalGathering ManagerDefaultApplicationPath

    HKEY_LOCAL_MACHINESOFTWAREMicrosoftOffice Server15.0SearchComponents{Both admin and crawl components}LocalStoragePath

    • After that search service should be restarted
    • and original folders:

    C:Program FilesMicrosoft Office Servers Debug15.0DataOffice ServerApplications{both admin and crawl components}

    • should be removed
    • ONLY modify these keys and on the Crawl Servers and Admin components..