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

Open
#359 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@ydvvdinesh is already working on this.

Since Oct 15, 2026.

  • #360 by @ydvvdinesh — closed without merging

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
22/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript
Domain
database

Research direction

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.

Written by the indexing model from the issue text.

Description

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
Dominant language
JavaScript
Stars
53
Forks
187
Avg merge
18m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AOSSIE-Org/OrgExplorer

All issues in AOSSIE-Org/OrgExplorer

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.