---
sourceDocument: Brazil ServiceNow AI Platform Capabilities
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/servicenow-platform

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# MID Server File Cleaner

# MID Server File Cleaner {#ariaid-title1}

Release version: Brazil  
Updated November 19, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of MID Server File Cleaner

The MID Server File Cleaner is a built-in monitor that runs within the MID Server to automatically delete old files and empty folders from specific directories.
Its purpose is to maintain manageable file sizes and quantities in the MID Server install folder, thereby preventing performance issues.
Show full answer Show less  
The cleaner deletes files last accessed more than 30 days ago. It runs once at MID Server startup and then every 24 hours thereafter. You can trigger it manually by restarting the MID Server service.

## Folders and Files Cleaned

* **\\agent\\import** and **\\agent\\export** -- These folders support the Export Set feature, where export files are temporarily stored.
* **\\agent\\work\\monitors\\ECCSender\\outputerror** -- Stores ECC input payloads that could not be inserted (used since San Diego release).
* **\\agent\\work\\monitors\\ECCSender\\outputoversize** -- Contains payload copies that exceed the configured maximum payload size (used since Eureka/Fuji releases).
* **\\agent\\logs** -- Specifically cleans JFR dump files (introduced in Utah release).

## Logging and Monitoring

The MID Server agent log records the start and stop of the File Cleaner monitor along with general scanning activity of the target directories. To get detailed run-time logs, enable debug logging by setting the parameter **mid.log.level=debug**. However, individual file or folder deletions are not logged.

## Disabling the MID File Cleaner

By default, the file cleaner is enabled. If you need to disable it entirely, add the configuration parameter **mid.filecleaner.disabled=true** on the MID Server form under Configuration Parameters or directly in the `config.xml` file. This stops automatic deletion of files from all monitored folders.

## Practical Implications for ServiceNow Customers

* Ensure any important files exported to the **agent\\export** folder are moved promptly, as the cleaner will delete files older than 30 days to avoid storage bloat.
* If troubleshooting ECC payload failures, note that error and oversize payloads are stored temporarily but cleaned periodically.
* Use the ability to disable the cleaner if you have a custom file retention or archival process and want to retain files longer.
* Enable debug logging if you need visibility into cleaner runs to diagnose issues related to file cleanup.  
A monitor thread runs in the MID Server to clean up old files, to keep the size and
quantity of files within the install folder manageable, and to prevent performance issues
with the MID Servers.
Files and empty folders within the following folders may be deleted by this MID File
Cleaner. Files [last accessed](https://docs.oracle.com/javase/7/docs/api/java/nio/file/attribute/BasicFileAttributes.html#lastAccessTime()) more than 30 days ago are
deleted.

It runs on startup, and then every 24 hours after that. You can force the File
Cleaner to run by restarting the MID Server service.

Folders/files cleaned:

* \\agent\\import
* \\agent\\export - Used by the Export Set feature.
* \\agent\\work\\monitors\\ECCSender\\output_error - Used since San Diego for ECC input payloads that cannot be inserted for any reason (see [PRB1521761/KB0995569](https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0995569)).
* \\agent\\work\\monitors\\ECCSender\\output_oversize - Used since Eureka/Fuji for saving copies of payloads that are not sent to the instance because they are larger than the limit set by mid.eccq.max_payload_size, which defaults to 20000000 bytes (see PRB598334)
* \\agent\\logs - Specifically JFR Dumps (Utah release)
{#mid_file_cleaner__ul_nxc_qz1_lbc}

## Logging {#mid_file_cleaner__section_nlv_qz1_lbc}

The MID Server agent log shows this monitor starting and shutting down with the MID
Server.

    2022-10-21T13:08:58.330+0200 INFO (MIDServer) [Main:265] Initializing MID Server 
    2022-10-21T13:10:36.527+0200 INFO (StartupSequencer) [Monitors:307] Enabling monitor: FileCleanerMonitor
    ... 
    2022-10-24T09:29:35.193+0200 INFO (MIDServer) [MIDServerState:160] MID Server stopping 
    2022-10-24T09:29:38.591+0200 INFO (MIDServer) [Instance:928] interrupting thread FileCleanerMonitor.21600

{#mid_file_cleaner__codeblock_okp_sz1_lbc}

To see exactly when it runs, enable debug with parameter
`mid.log.level=debug`.

    2022-11-17T02:49:13.201-0800 DEBUG (FileCleanerMonitor.21600) [AFileCleaner:103] Scanning directory to delete files: C:\...\agent\import
    2022-11-17T02:49:13.201-0800 DEBUG (FileCleanerMonitor.21600) [AFileCleaner:103] Scanning directory to delete files: C:\...\agent\export
    2022-11-17T02:49:13.201-0800 DEBUG (FileCleanerMonitor.21600) [AFileCleaner:103] Scanning directory to delete files: C:\...\agent\work\monitors\ECCSender\output_error
    2022-11-17T02:49:13.201-0800 DEBUG (FileCleanerMonitor.21600) [AFileCleaner:103] Scanning directory to delete files: C:\...\agent\work\monitors\ECCSender\output_oversize
    2022-11-17T02:49:13.201-0800 DEBUG (FileCleanerMonitor.21600) [AFileCleaner:103] Scanning directory to delete files: C:\...\agent\logs

{#mid_file_cleaner__codeblock_eg4_5z1_lbc}

There is no logging for individual file/folder deletes.

## Disabling the MID File Cleaner {#mid_file_cleaner__section_ijg_vz1_lbc}

Export Sets write files to the MID Server agent\\export folders. The idea is then that
a custom implementation on the customer side takes those files and moves them
elsewhere, so that these files only need to remain in the MID Server application's
install directory for a short time.

The MID File Cleaner can be disabled completely for all folders, by adding the MID
Server Configuration Parameter **mid.file_cleaner.disabled=true**. When the
parameter is not present, which is the out-of-box state, it defaults to false, and
the file cleaner runs.

On the MID Server form, click New on the "Configuration Parameters" related list,
select mid.file_cleaner.disabled, and enter the value "true".

This can also be manually added to the config.xml file: `<parameter
name="mid.file_cleaner.disabled" value="true"/>`. See [MID Server parameters](https://servicenow-prod.fluidtopics.net/m34H5iUcdYwND5PfkL3EWQ#mid-server-parameters "Parameters control the behavior of a particular MID Server and have lower precedence than MID Server properties.") for more information.
**Related concepts**   

* [MID Server upgrades](https://servicenow-prod.fluidtopics.net/Cu5q_whYLguDZaiG~Z8hWA "Upgrade MID Servers manually, or automatically through the instance. MID Server automatic upgrade is triggered when the instance upgrades and the MID Server no longer has the same version. The new MID Server package is downloaded from install.service-now.com, replaces the old one, and the MID Server starts with the new version.")
* [MID Server dashboard](https://servicenow-prod.fluidtopics.net/AKi6keudZUXlQ3MOX7oCGA "The MID Server dashboard is a central place for MID Server users to monitor ongoing operations. The dashboard consists of reports and gauges that display information from the MID Server Status table.")
* [MID Server privileged commands](https://servicenow-prod.fluidtopics.net/rnsRWz9AcRZy7_XYBkR2~w#c_PrivilegedCommandsForMIDServer "To discover certain information on a host server, the MID Server must run SSH commands with higher privileges. The platform provides default privileged commands for the MID Server to use and the ability to add additional commands to the system.")  
**Related tasks**   

* [Manually start, stop, and restart a MID Server](https://servicenow-prod.fluidtopics.net/qh8uiqlcO38byGYxgj~5FA "Start, stop, or restart a MID Server manually when needed.")
* [Set the MID Server JVM memory size](https://servicenow-prod.fluidtopics.net/D_FZ0gYUngYbo3b~v6EXwA "The MID Server starts with a default JVM memory allocation, but you can modify this setting in the configuration file.")
* [Pause the MID Server](https://servicenow-prod.fluidtopics.net/YnFtghzXyI6~1Nnk5oYEjg#t_PauseTheMIDServer "Pause the MID Server to temporarily prevent it from polling the ECC Queue for work or sending Discovery results back to the instance.")  
**Related reference**   

* [MID Server system requirements](https://servicenow-prod.fluidtopics.net/XiKcbDE3sfZ4Dtcnd47zqw "Use these minimum system requirements to allocate resources for computers hosting MID Servers.")
* [Resolving MID Server issues](https://servicenow-prod.fluidtopics.net/G6T3SV8S73mzmrNtMxvbxQ "Troubleshoot problems with the MID Server to find solutions. Monitor the MID Server to receive alerts about issues as they occur. Troubleshooting procedures exist to resolve specific problems with the MID Server. The Knowledge Base on Hi contains several articles to help you troubleshoot MID Server issues.")
* [MID Server properties](https://servicenow-prod.fluidtopics.net/0wWV9ftFPfP7zRKa_oIB2Q#r_MIDServerProperties "Properties control the behavior of all MID Servers or a particular MID Server.")
* [MID Server parameters](https://servicenow-prod.fluidtopics.net/m34H5iUcdYwND5PfkL3EWQ#mid-server-parameters "Parameters control the behavior of a particular MID Server and have lower precedence than MID Server properties.")
* [MID Server Configuration Parameter settings and priority](https://servicenow-prod.fluidtopics.net/MuRPEmUg3FjmV27_l6t2Vg "The MID Server's settings reside in multiple tables and the MID Server prioritizes them in a set order. MIDConfigParameter must be defined with the correct type-style builders.")
* [MID Server protected records and reserved characters](https://servicenow-prod.fluidtopics.net/I98PmExKXGYau3CM2kspAQ "Some MID Server records cannot be altered. Certain special characters are pre-defined in XML and cannot be used in passwords.")
* [MIDSystem methods](https://servicenow-prod.fluidtopics.net/9qVQ2Z_wSqyEPrSfHAQMtQ "MIDSystem variables (referred to by the variable name ms.) provide a variety of methods to get information about the MID Server.")
* [MID Server heartbeat](https://servicenow-prod.fluidtopics.net/f3G5_fbly4TCKCCK7v56fw "The instance checks the MID Server for a response every 5 minutes, using a synthetic transaction monitoring system.")

