Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#Mail: Deleting a large number of messages fails with HTTP 400 or 414 #1555

Open
gtandersen opened this issue Apr 16, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working P2-high
Milestone

Comments

@gtandersen
Copy link
Contributor

gtandersen commented Apr 16, 2024

Describe the bug
When deleting a large number of messages, the server responds to the DELETE request with:

  • 400 Bad request / Your browser sent an invalid request. by the proxy server when the local index is not in use.
  • 414 Request-URI Too Large by nginx when the local index is in use.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://runbox.com/app
  2. Select a large number (hundreds) of messages.
  3. Click to delete the messages.
  4. Observe that the messages disappear for a few seconds and then return.

Expected behavior
All the selected messages should be deleted (moved to Trash).

Desktop (please complete the following information):

  • OS: macOS
  • Browser : Firefox

Additional context
Moving a large number of messages with or without the local index works as expected, presumably because the request is a POST and not a DELETE. However, if moving messages without the local index they will still appear in the source folder on other devices that use the local index, possibly because moving messages to Trash (as opposed to deleting) does not include them in https://runbox.com/rest/v1/list/deleted_messages/.

See also #1244

@gtandersen gtandersen added bug Something isn't working P2-high labels Apr 16, 2024
@gtandersen gtandersen added this to the Gleipnir milestone Apr 16, 2024
@gtandersen gtandersen changed the title Deleting a large number of messages fails with HTTP 400 or 414 #Mail: Deleting a large number of messages fails with HTTP 400 or 414 Apr 16, 2024
@gtandersen gtandersen modified the milestones: Gleipnir, Heimdallr May 14, 2024
@gtandersen gtandersen modified the milestones: Heimdallr, Iðunn Jun 10, 2024
@castaway castaway self-assigned this Jun 24, 2024
@castaway
Copy link
Contributor

castaway commented Jun 24, 2024

rest api / nginx settings: https://medium.com/aviabird/413-414-request-url-entity-too-large-error-nginx-b6dcece6f5dd

  • client_max_body_size set to 130m
  • large_client_header_buffers unset, default is 8 KB

rmmapi.ts deleteMessages - http.delete(`/rest/v1/email/${ids} - this can be too long, we should change it to a POST, and put the IDs list in the body

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2-high
Projects
None yet
Development

No branches or pull requests

3 participants