nextcloud / mail

💌 Mail app for Nextcloud
https://apps.nextcloud.com/apps/mail
GNU Affero General Public License v3.0
831 stars 257 forks source link

Memory leak in browser when opening a large mailbox that has not been opened before #6718

Open small1 opened 2 years ago

small1 commented 2 years ago

Steps to reproduce

  1. Go to mail
  2. Navigate to a mailbox (with more than 1.5k emails) that has not been opened at all or opened a long time ago

Expected behavior

Open the mailbox. Wait for the sync and show messages. Memory could go up but should be released after a while.

Actual behavior

the tab or chrome will eventually stop responding eating away at 2.5gb or ram

Mail app version

1.13.3

Mailserver or service

Dovecot

Operating system

Debian 11

PHP engine version

PHP 8.0

Web server

Nginx

Database

MariaDB

Additional info

Using google chrome Version 102.0.5005.61 (Official Build) (64-bit)

Screenshot from 2022-06-10 12-10-18 Screenshot from 2022-06-10 12-04-45 Screenshot from 2022-06-10 12-03-17 Screenshot from 2022-06-10 12-00-13

ChristophWurst commented 2 years ago

IIRC this happens because of a faulty front-end sync where we request the full mailbox instead of just 20 messages. Then all mailbox messages are rendered and consume memory.

ChristophWurst commented 2 years ago

Earlier report: https://github.com/nextcloud/mail/issues/2974

ChristophWurst commented 2 months ago

Confirmed to happen occasionally