supertokens / supertokens-core

Open source alternative to Auth0 / Firebase Auth / AWS Cognito
https://supertokens.com
Other
13.22k stars 525 forks source link

Limit heap size in JVM #241

Open rishabhpoddar opened 3 years ago

rishabhpoddar commented 3 years ago

Add the -Xmx option that limits the maximum heap size for the jvm.

Quick overview: https://alvinalexander.com/blog/post/java/java-xmx-xms-memory-heap-size-control/

C-mmon commented 2 years ago

I would love to take this issue and work on it. This will be very useful for devices such as raspbery pi, allowing better memory management.

rishabhpoddar commented 2 years ago

Hey @C-mmon. Thanks for showing interest. The idea here is to be able to start the core in a way that limits the memory consumption.

The config to provide a ceiling value for memory can be provided in the config.yaml file, or in the CLI command line that starts the java process. What do you think?

C-mmon commented 2 years ago

Yes, I will try to determine range that will allow it to work perfectly. Like determining the initial value. As well as document the whole thing, with correct notation.

rishabhpoddar commented 2 years ago

Sounds good! Thank you. I'll assign this issue to you.