Skip to content

Architecture: no disk quota or cleanup for screenshot files #45

@tkadauke

Description

@tkadauke

Description

Screenshots are stored as PNG files on the server filesystem (lib/session.rb:57). The ScreenshotFile class manages retention via retain/release reference counting, but there is no:

  • Disk usage cap per account
  • Maximum number of screenshots per health check
  • Age-based cleanup policy
  • Compression beyond pngcrush

Full-page screenshots at high resolution can be 500KB–2MB each. With 1-minute checks and multiple TakeScreenshotStep steps, a single health check can generate gigabytes per day.

Impact

  • Disk exhaustion on the host server causes all checks to fail.
  • No multi-tenant fairness: one account can consume all disk space.
  • No cost visibility for screenshot storage.

Suggested approach

  1. Add a max_screenshots setting per health check or account.
  2. Implement a background job that prunes screenshots older than N days.
  3. Consider storing screenshots in object storage (S3, GCS) instead of local filesystem.
  4. Add disk usage monitoring/alerting.

Effort: medium

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions