diff options
author | Michal Duda <michal.duda@sonarsource.com> | 2019-05-16 12:36:17 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-05-21 20:21:07 +0200 |
commit | dfcb1c01a430cf3317d12ff4448fc700b9979d4f (patch) | |
tree | 07a32c098cc59661abf85ff15bdff909e2cfd4b0 /sonar-application/src | |
parent | 42aa152b7b174ce55796b8b00758d1fe63643cb7 (diff) | |
download | sonarqube-dfcb1c01a430cf3317d12ff4448fc700b9979d4f.tar.gz sonarqube-dfcb1c01a430cf3317d12ff4448fc700b9979d4f.zip |
SONAR-11720 Set different memory defaults for EE+
Diffstat (limited to 'sonar-application/src')
-rw-r--r-- | sonar-application/src/main/assembly/conf/sonar.properties | 12 | ||||
-rw-r--r-- | sonar-application/src/main/java/org/sonar/application/App.java | 3 |
2 files changed, 8 insertions, 7 deletions
diff --git a/sonar-application/src/main/assembly/conf/sonar.properties b/sonar-application/src/main/assembly/conf/sonar.properties index 984274da44e..301f1b61438 100644 --- a/sonar-application/src/main/assembly/conf/sonar.properties +++ b/sonar-application/src/main/assembly/conf/sonar.properties @@ -84,7 +84,7 @@ #-------------------------------------------------------------------------------------------------- # WEB SERVER -# Web server is executed in a dedicated Java process. By default heap size is 512Mb. +# Web server is executed in a dedicated Java process. By default heap size is @webDefaultHeapSize@. # Use the following property to customize JVM options. # Recommendations: # @@ -96,7 +96,7 @@ # -Djava.security.egd=file:/dev/./urandom is an option to resolve the problem. # See https://wiki.apache.org/tomcat/HowTo/FasterStartUp#Entropy_Source # -#sonar.web.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError +#sonar.web.javaOpts=@webJavaOpts@ # Same as previous property, but allows to not repeat all other settings like -Xmx #sonar.web.javaAdditionalOpts= @@ -238,7 +238,7 @@ #-------------------------------------------------------------------------------------------------- # COMPUTE ENGINE # The Compute Engine is responsible for processing background tasks. -# Compute Engine is executed in a dedicated Java process. Default heap size is 512Mb. +# Compute Engine is executed in a dedicated Java process. Default heap size is @ceDefaultHeapSize@. # Use the following property to customize JVM options. # Recommendations: # @@ -246,7 +246,7 @@ # is not enabled by default on your environment: # http://docs.oracle.com/javase/8/docs/technotes/guides/vm/server-class.html # -#sonar.ce.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError +#sonar.ce.javaOpts=@ceJavaOpts@ # Same as previous property, but allows to not repeat all other settings like -Xmx #sonar.ce.javaAdditionalOpts= @@ -255,7 +255,7 @@ #-------------------------------------------------------------------------------------------------- # ELASTICSEARCH # Elasticsearch is used to facilitate fast and accurate information retrieval. -# It is executed in a dedicated Java process. Default heap size is 512Mb. +# It is executed in a dedicated Java process. Default heap size is @searchDefaultHeapSize@. # # -------------------------------------------------- # Word of caution for Linux users on 64bits systems @@ -269,7 +269,7 @@ # # JVM options of Elasticsearch process -#sonar.search.javaOpts=-Xms512m -Xmx512m -XX:+HeapDumpOnOutOfMemoryError +#sonar.search.javaOpts=@searchJavaOpts@ # Same as previous property, but allows to not repeat all other settings like -Xmx #sonar.search.javaAdditionalOpts= diff --git a/sonar-application/src/main/java/org/sonar/application/App.java b/sonar-application/src/main/java/org/sonar/application/App.java index d262fe5df9c..af29478eeef 100644 --- a/sonar-application/src/main/java/org/sonar/application/App.java +++ b/sonar-application/src/main/java/org/sonar/application/App.java @@ -33,6 +33,7 @@ import org.sonar.application.process.ProcessLauncher; import org.sonar.application.process.ProcessLauncherImpl; import org.sonar.application.process.StopRequestWatcher; import org.sonar.application.process.StopRequestWatcherImpl; +import org.sonar.core.extension.ServiceLoaderWrapper; import org.sonar.process.System2; import org.sonar.process.SystemExit; @@ -50,7 +51,7 @@ public class App { } public void start(String[] cliArguments) throws IOException { - AppSettingsLoader settingsLoader = new AppSettingsLoaderImpl(cliArguments); + AppSettingsLoader settingsLoader = new AppSettingsLoaderImpl(cliArguments, new ServiceLoaderWrapper()); AppSettings settings = settingsLoader.load(); // order is important - logging must be configured before any other components (AppFileSystem, ...) AppLogging logging = new AppLogging(settings); |