-
Notifications
You must be signed in to change notification settings - Fork 701
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
WebHost: Set Generator memory limit to 4GiB #4319
WebHost: Set Generator memory limit to 4GiB #4319
Conversation
May I dumbly ask why? The more it can use the faster, no? |
The site has maxed out on memory multiple times since 0.5.1 released, meaning that rooms may be unable to start. Do we have any data with how much memory Generator uses currently? |
Not really. Generating a seed takes X amount of memory. Throwing more at it does not make it faster unless the code is changed to be "wasteful but faster" (which would break other things anyway).
Not that I know of. There are some options that are not banned from WebHost that use a lot of memory and I hope by allowing 4GB we don't break those, even if all 20 players pick them, while giving the system enough slack to kill misbehaving processes. |
Should probably be a config option and it feels odd to have it in a function called init_db.. doesn't that affect more than gen as well? |
Done.
This is already done in #4310, however since the two are conflicting anyway (now even more), I pushed the rename here as well. |
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
* WebHost: Set Generator memory limit to 4GiB * WebHost: make generator memory limit configurable, better naming * Update WebHostLib/__init__.py Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com> * Update docs/webhost configuration sample.yaml --------- Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com> (cherry picked from commit 4a5ba75)
What is this fixing or adding?
Sets WebHost generator memory limit to 4GB
How was this tested?
_ = bytearray(8*1024*1024*1024)
in gen_game()'s task