Skip to content

Temp folder fills up with mongodb-memory-server data (hundreds of GB) #155

@Mediainvita

Description

@Mediainvita

Problem

When using AutoForge with projects that use mongodb-memory-server for testing, the Windows temp folder (%TEMP%\mongodb-memory-server) accumulates hundreds of gigabytes of MongoDB binary downloads that are never cleaned up.

I have to manually delete this folder twice a day - it grows to 950GB+ and fills the entire drive.

Steps to reproduce

  1. Create a project that uses mongodb-memory-server for tests (e.g., a Node.js backend with Jest)
  2. Run the AutoForge agent multiple times
  3. Check %TEMP%\mongodb-memory-server* folder size

Expected behavior

Temporary test files should be cleaned up after agent runs, or use a persistent cache location that doesn't grow unbounded.

Suggested fixes

  1. Add cleanup hook - Delete mongodb-memory-server temp folders after agent completion/crash
  2. Configure cache - Set MONGOMS_DOWNLOAD_DIR environment variable to a persistent location
  3. Document workaround - Add note in docs for projects using mongodb-memory-server

Current workaround

Manually delete %TEMP%\mongodb-memory-server* or use a cleanup script.

Environment

  • OS: Windows 11
  • Python: 3.14.0
  • Node.js: 24.11.1
  • AutoForge: commit 486979c (tested), now updated to latest master
  • Affected: Projects using mongodb-memory-server for tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions