Skip to content

[BUG] Exponential Backoff Reconnection for Appwrite Database Connection #678

Description

@knoxiboy

Problem Statement

If the internet connection is unstable, Appwrite database client connection requests fail and the client enters an error state. It does not attempt to reconnect automatically when the network recovers, forcing users to refresh the page.

Proposed Solution

Implement exponential backoff reconnection for Appwrite:

  1. In src/app.js or database connection instantiation, catch connection errors.
  2. If connection fails, trigger a reconnection attempt after a delay.
  3. Scale the delay exponentially (e.g. 1s, 2s, 4s, 8s, up to 30s) to prevent overloading the server.
  4. Show a non-blocking floating status banner ("Reconnecting to database...") in the UI during retry cycles.

Alternatives Considered

Forcing a page reload, but this clears active form state and results in a bad user experience.

Additional Context

Level: Critical
Affected Files: src/app.js, src/realtime-sync.js

Can you please assign this issue to me? I would like to work on this.

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