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

JVM -Xmx, -Xms, and additional java args not being set by start script #2284

Closed
lyleschemmerling opened this issue May 25, 2023 · 2 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@lyleschemmerling
Copy link

lyleschemmerling commented May 25, 2023

JVM -Xmx, -Xms, and additional java args not being set by start script

Description

the resolveConfigurationProperty function tries to check for the FUSIONAUTH_CONFIG_DIR to look up the props file, but that variable is never set (CONFIG_DIR) is.

Affects versions

1.38.1 to 1.46.0 (assuming this is shipped in 1.46.0)

Steps to reproduce

Check jvm settings

Expected behavior

Should respect what is in fusionauth.properties

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

Additional context

This will only affect machines that were relying on fusionauth.properties to obtain the JVM args for heap size and additional java arguments

Since we are not explicitly setting the Java heap size properties on FusionAuth app the JVM is using the VM default which looks to be about 25% of the VM available RAM. So far we haven't seen any systems with OutOfMemory errors so it is unlikely that this is hindering performance on any machines that we have seen. However if necessary the parameters can be set via FUSIONAUTH_APP_MEMORY and FUSIONAUTH_APP_ADDITIONAL_JAVA_ARGS.

FusionAuth instances running in Docker should be container aware and should only be using memory allocated to the container. Anyone explicitly setting the JVM args via environment variables will be unaffected.

This will only affect fusionauth-app and not fusionauth-search (i.e. ElasticSearch).

@robotdan
Copy link
Member

Can you add some details to explain what is happening due to this bug and whom it will affect, or not affect?

For example:

  1. Does not affect Docker, or anyone using environment variables to set memory
  2. Does not affect fusionauth-search , only fusionauth-app
  3. When -Xmx -Xms are not set, the VM will default the heap to something, in our observation it was 25% of available RAM. So this should be considered if anyone runs into this issue or the heap config for the Java process for fusionauth-app is too low or too high.

@robotdan robotdan changed the title JVM -Xmx, -Xmx, and additional java args not being set by start script JVM -Xmx, -Xms, and additional java args not being set by start script May 25, 2023
@lyleschemmerling lyleschemmerling self-assigned this May 25, 2023
@lyleschemmerling
Copy link
Author

@robotdan robotdan reopened this Jun 5, 2023
@robotdan robotdan added the bug Something isn't working label Jun 5, 2023
@robotdan robotdan added this to Backlog in FusionAuth Issues via automation Jun 5, 2023
@robotdan robotdan added this to the 1.46.0 milestone Jun 5, 2023
@robotdan robotdan moved this from Backlog to Reviewer approved in FusionAuth Issues Jun 5, 2023
@robotdan robotdan moved this from Reviewer approved to Done in FusionAuth Issues Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
FusionAuth Issues
  
Delivered
Development

No branches or pull requests

2 participants