nextcloud / nextcloud/mail

Memory leak in initial mail:account:sync

Open
#10,099 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug performance 🚀
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

Steps to reproduce
  1. Add an account with many emails via CLI
  2. Run occ mail:account:sync
Expected behavior

Stable memory consumption

Actual behavior

Increasing memory consumption

Batch of new messages sync'ed. 936MB of memory in use
Batch of new messages sync'ed. 2870MB of memory in use
Batch of new messages sync'ed. 5624MB of memory in use
Batch of new messages sync'ed. 8307MB of memory in use
Batch of new messages sync'ed. 9304MB of memory in use

Memory used is a lot higher here because I ran the process with blackfire.

Mail app version

4.0.0

Mailserver or service

No response

Operating system

No response

PHP engine version

None

Web server

None

Database

None

Additional info

No response

Contributor guide

Open the contributing guide

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.

Research direction

The report names the occ mail:account:sync CLI entry point but no source file or test. Reproduce the leak with an account containing many emails and observe memory after each sync batch. Done means memory remains stable throughout the initial synchronization.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.