Big customers getting OOMs when saving cohorts.
Open
@dmarticus is already working on this.
Since Apr 27, 2026.
feature/cohorts
feature/feature-flags
performance
team/feature-flags
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 7h 27m
- Merged PRs (30d)
- 222
Description
In what situation are you experiencing subpar performance?
A big customer is getting OOMs when saving cohorts.
How to reproduce
List of all failing cohorts. EU also has quite a few
Example failing query. Unrestricted this peaks at >100GB
I played around with this a bit. By specifying which props to query in the subquery, it only peaks at 14GB of memory.
Example solution
Environment
- PostHog Cloud
- PostHog self-hosted with Kubernetes (deprecated, see "Sunsetting Kubernetes support"), version/commit: [please provide]
Additional context
Thank you for your performance issue report – we want PostHog to go supersonic!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.