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

[Platform] Restore of large number of keyspaces/tables fails with '413 Request Entity Too Large' #6817

Closed
tvesely opened this issue Jan 8, 2021 · 3 comments
Assignees
Labels
area/platform Yugabyte Platform

Comments

@tvesely
Copy link
Contributor

tvesely commented Jan 8, 2021

The default value for play.http.parser.maxMemoryBuffer in the yugabyte server is too small to process a restore request of around 100 tables.

Reproduction Steps:

  • Create a universe with 200 tables within YCQL keyspaces
  • Create a YCQL backup of all keyspaces, with all tables in keyspaces
  • Run a restore of the resulting Universe backup
  • Observe the POST request to api/v1/customers/<uuid>/universes/<uuid>/backups/restore fails with 413 Request Entity Too Large

The issue can be worked around by adding the play.http.parser.maxMemoryBuffer setting in application.docker.conf

play.http.parser.maxMemoryBuffer=300KiB 
@kmuthukk kmuthukk added the area/platform Yugabyte Platform label Jan 11, 2021
@kmuthukk
Copy link
Collaborator

thx for reporting the issue here, @tvesely !

@daniel-yb
Copy link
Contributor

daniel-yb commented Jan 15, 2021

@sb-yb I'm assigning this to you as part of the API interface work you're doing for sending/receiving backups since this will most likely have to be bumped up higher than 300kb to receive backup files.

@sb-yb
Copy link
Contributor

sb-yb commented Jan 16, 2021

This one is actually unrelated to sending and receiving backups. Its not some big file but just a json node in request body. So content type is "application/json" for such case play.http.parser.maxMemoryBuffer should fix the issue.

For other issue I am using multipart/form-data and for that one needs to set play.http.parser.maxDiskBuffer

So similar but not same issues and hence will fix in separate PRs.

sb-yb added a commit that referenced this issue Jan 20, 2021
Summary:
Bumping up maxMemoryBuffer allocated by play framework to read the request payload.
Also introduce common config to tackle overriding `reference.conf` of other libraries.

Test Plan:
- Unit test added to test the limit has increased and enforced.
- Built yb_release ran yugaware and checked the logs for value of maxMemoryBuffer that is resolved:
```
$ ls conf/*.common.conf
conf/application.common.conf
$
$ grep -o maxMemoryBuffer........ logs/application.log
maxMemoryBuffer":"500k"
maxMemoryBuffer":"500k"
```

Reviewers: arnav, sanketh, spotachev, daniel

Reviewed By: daniel

Subscribers: jenkins-bot, yugaware

Differential Revision: https://phabricator.dev.yugabyte.com/D10386
polarweasel pushed a commit to lizayugabyte/yugabyte-db that referenced this issue Mar 9, 2021
Summary:
Bumping up maxMemoryBuffer allocated by play framework to read the request payload.
Also introduce common config to tackle overriding `reference.conf` of other libraries.

Test Plan:
- Unit test added to test the limit has increased and enforced.
- Built yb_release ran yugaware and checked the logs for value of maxMemoryBuffer that is resolved:
```
$ ls conf/*.common.conf
conf/application.common.conf
$
$ grep -o maxMemoryBuffer........ logs/application.log
maxMemoryBuffer":"500k"
maxMemoryBuffer":"500k"
```

Reviewers: arnav, sanketh, spotachev, daniel

Reviewed By: daniel

Subscribers: jenkins-bot, yugaware

Differential Revision: https://phabricator.dev.yugabyte.com/D10386
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform Yugabyte Platform
Projects
None yet
Development

No branches or pull requests

5 participants