[BUG]: Unclosed IndexedDB connections cause resource leaks during multi-org exploration

Offen
#359 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@ydvvdinesh arbeitet bereits daran.

Seit 15.10.2026.

  • #360 von @ydvvdinesh — ohne Merge geschlossen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
22/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
javascript
Bereich
database

Rechercherichtung

Start in src/services/github.js, where openDB() is called by cacheGet, cacheSet and cacheClear, each opening its own connection with indexedDB.open(DB_NAME, 1). Check the open pull request #360 first, since it is already working on this. Done means every transaction path closes its connection on completion, error and abort, and that repeated cache operations no longer leave handles open.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug
Bug Description

In src/services/github.js, cache functions (cacheGet, cacheSet, cacheClear) call openDB(), which opens a new connection via indexedDB.open(DB_NAME, 1). However, db.close() is never called when transactions complete, error, or abort.

When exploring organizations with many repositories, contributors, issues, and pull requests, dozens to hundreds of open IDBDatabase connections accumulate and remain open in the browser process. This leads to connection pool exhaustion, browser memory retention, and blocks database deletions or schema version upgrades (onblocked).

Steps to Reproduce
  1. Open OrgExplorer and explore a multi-repo organization (e.g. AOSSIE-Org or facebook).
  2. Open Browser DevTools -> Application -> Storage -> IndexedDB.
  3. Inspect active connection handles or trigger multiple cache clearing operations in Settings.
  4. Observe that dozens of IDBDatabase connections remain open without being closed upon transaction completion.
Logs and Screenshots

No error thrown initially, but memory profiles show accumulating IDBDatabase handles, and version change requests or cache clears can trigger onblocked due to lingering open connections.

Environment Details
  • OS: Windows 11 / Linux / macOS
  • Browser: Chrome / Firefox / Safari / Edge
  • Node.js: 20.x / 22.x
Impact

High - Major feature is broken

Code of Conduct
  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates
Vorherrschende Sprache
JavaScript
Sterne
53
Forks
187
Ø Merge
18 Min.
Gemergte PRs (30 T.)
2

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus AOSSIE-Org/OrgExplorer

Alle Issues in AOSSIE-Org/OrgExplorer

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.