the-djmaze / snappymail

Simple, modern & fast web-based email client
https://snappymail.eu
GNU Affero General Public License v3.0
984 stars 115 forks source link

Emails in Large Inbox do not Show on Pagination (PHP 64 bit) #1730

Open stef204 opened 2 weeks ago

stef204 commented 2 weeks ago

Describe the bug There are a number of issues mentioning the problem caused by 32 bit PHP. However, on my side, PHP is 64 bit (please see config here and also here) and I am still experiencing what looks to be the same or similar/related issue.

This shows up as snappymail not showing all of the emails in INBOX, no pagination. The INBOX is quite large, over 200k emails.

I group emails by Day. To remedy the above, I can click on Today and it will then show all of the emails received Today with proper pagination for Today, e.g. 15 pages which I can then click through to see the messages. However, the pages do NOT show up when first logging in and landing on the Inbox page; and without using that filtering "trick" above (clicking Today.)

To Reproduce Steps to reproduce the behavior:

  1. Just log into email account and land on Inbox page on email account with very high number of emails ~200k.

Expected behavior On a server using PHP 64 bit, have the pagination show all pages or at least enough pages with a (...) to get additional pages (e.g. pages 1-15; then 16-30, etc.) to be able to scroll through all emails, page by page. For example, if I click on "Today" I have 36 pages as of now. And I can look through all of the emails page by page.

Please complete the following information:

More context I've noticed that if I apply the filtering trick described above (click on Today with Grouped view --default for me), then click the x at the right corner of the search bar, the pages for the full inbox are there: 11k pages. I see 1 2 3 4 5...11524. However, as soon as switch account and go back to this large message count one, the problem re-occurs.

Note 1: I have logged out and logged back in and it seems to have "fixed itself for the time being." Very weird. Note 2: And it's gone again now, problem is back. This also occurs when I log in directly to the problem account (as apposed to switching to it from another account.) Note 3: If I click on the Reload Message List button in the toolbar, it paginates properly instantly

the-djmaze commented 2 weeks ago

Go to admin domains and set a limit on the amount of messages. This limits it to N messages to see/paginate and should help speed things up. Because your mailserver is to slow to process all messages within the 30 seconds time limit and goes to background process every tine a new message arrives.

stef204 commented 2 weeks ago

I tried 2500 but no change so went down to 1000 which resolved it, and then settled on 1500 which still works. Thanks for this quick fix, most appreciated.

stef204 commented 2 weeks ago

Actually, I take it back. Problem is still there -- especially since having installed the "Filter Search" plugin, which seems to slow things down and possibly bring the problem back..... I disabled the plugin and it didn't have an impact. So using 1000 as the limit on email still isn't enough to make the problem disappear -- consistently. What do you suggest?

the-djmaze commented 2 weeks ago

Maybe one of these options might help? https://github.com/the-djmaze/snappymail/wiki/Improve-performance