linagora / tmail-flutter

A multi-platform (Flutter) application for reading your emails, with your favorite devices, using the JMAP protocol!
GNU Affero General Public License v3.0
299 stars 65 forks source link

[STALLWART] The number of ids requested by the client exceeds the maximum number the server is willing to process in a single method call. #3011

Open chibenwa opened 1 month ago

chibenwa commented 1 month ago

Description

GIVEN I use StallWart (no push and limits on maximum items in /get) AND I receive 100 email WHEN I resynchronize THEN it breaks with the following error: [STALLWART] The number of ids requested by the client exceeds the maximum number the server is willing to process in a single method call.

The number of items in a single method call is known with the JMAP session

If the number of elements changes / new discovered through /changes call exceeds this value, we shall cut the /get calls into smaler chunks for them to succeed.

CF https://github.com/stalwartlabs/mail-server/issues/513#issuecomment-2231560031

hoangdat commented 1 month ago

hi @chibenwa, how about if we set maxChanges in Email/change with the value of min(maxObjectsInGet, 128)

chibenwa commented 1 month ago

Yes but then you would need to handle when there is too much changes ;-)

hoangdat commented 1 month ago

when there is too much changes

Can you more details? too many changes, maybe come from other clients. For me, I always reproduce this case with some actions for hundreds emails in thunderbird