Skip to content
← Back to activity

Public problem

PostHog app consuming excessive browser memory tabs in background

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Users reported the PostHog web app consuming excessive browser memory, with memory accumulating while tabs sit in the background and dropping when the tab is reopened. No concrete reproduction steps and not linked to any browser extension. Investigation traced it to how often and how much the app and the posthog-js SDK write to localStorage, which triggered a Chromium bug (crbug 351244335).

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

Fixed by the PostHog team: they reorganized how the app and the posthog-js SDK deal with localStorage, massively reducing both the frequency and the size of each localStorage write, which avoids triggering the underlying Chromium bug. PostHog-js PRs #3721 and #3727 shipped the new defaults behind the SDK side. Reports stopped after the fix. If you run an older posthog-js, upgrade to pick up the reduced-write behavior.

Source: https://github.com/PostHog/posthog/issues/32479

Source: https://github.com/PostHog/posthog/issues/32479