Skip to content

Data exhaustion (31GB+) and battery drain due to infinite retry loop when backend is offline #230

@robotter112

Description

@robotter112

Issue Description

  • User intentionally shut down their self-hosted Matrix Synapse backend server to save resources.
  • Grid app entered an infinite retry loop attempting to reconnect in the background.
  • App consumed ~31.75 GB of mobile data within approximately 10 hours (from ~13:40 to 03:40).
  • Resulted in massive battery drain.
  • User's mobile data plan was completely exhausted due to this loop.

Device Information

  • Device: Google Pixel 9 Pro XL
  • OS: Android 16
  • App: Grid (MyGrid)

Troubleshooting Attempted

  • User had previously set the app's battery optimization to "Unrestricted" and explicitly allowed background data usage.
  • (User noted this unrestricted setup was the only workaround for previous issues with poor background sync and constant random logouts).
  • Backend Matrix server was taken offline, triggering the infinite network requests.
  • User captured data usage screenshots to document the massive spike.

Expected Behavior
App should gracefully handle connection failures when the Matrix Synapse server is unreachable. It must implement a circuit breaker or an exponential backoff strategy for sync attempts, ensuring it does not drain battery or consume massive amounts of mobile data when the server is down.

Actual Behavior
App continuously attempts to sync with the offline server without any cooldown, burning through 31.75 GB of background data in 10 hours and causing severe battery drain.

Additional Context
This appears to be a critical missing fail-safe in the Matrix sync protocol implementation for Android. When the backend is completely offline, the app lacks rate limiting for its reconnection attempts, leading to severe device resource exhaustion. 2 screenshots are attached showing the 31.75 GB data consumption and the extreme usage spike on the graph.

Image Image

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