Hi experts,
According to https://documentation.sas.com/doc/en/bicdc/9.4/bisag/n0dmcsej9auu5an1pqtm7wx2dqpy.htm SAS Web App services need to be rebuilt when changing configuration options such as Xmx Java option in wrapper.conf file.
I noticed that the same Xmx value is specified both in conf\wrapper.conf and also in bin\setenv.bat files of SASServer1_1.
Questions:
1. Why does this parameter (and others) appear in both files? Does SAS Web Appserver read/execute both files and if so in which order?
2. Do I need to change Xmx in both files or is it enough to change only in one of them (in which)?
The instructions say to rebuild the service if a change is done to the wrapper.conf file which makes question 2 above even more interesting
Thanks
The JVM_OPTS arguments in setenv.bat are not used when rebuilding the service. I would advise leaving that file alone, in M7 it is used to setup env variables used by other scripts/commands.
If you want to change Xmx Xms etc change them in the corresponding wrapper.conf for the target WebAppServer prior to running the powershell -file .\SASServiceCtl.ps1 -action install...
NOTE: you also need to remove the following hardcoded values from SASServiceCtl.ps
Removed hardcoded
"--JvmMs 1024 " +
"--JvmMx 4096 "
Else the service will not be updated with the values from the wrapper.conf. Once you re-install the service you can verify your changes by running
"D:\Program Files\SASHome\SASWebApplicationServer\9.4\apache-tomcat-9.0.55\bin\tomcat9w.exe" //ES//SAS-Config-Lev1-SASServer1_1-WebAppServer
The initial and max memory from the Java tab should be blank but you will see your updated values in the Java Options: box
Thanks @JuanS_OCS although not sure this answers my questions.
The scenario I am asking about is when SAS Web App Servers are installed as Windows Services on Windows server machine.
I don't understand what exactly "setenv.bat" is used for and whether it needs to be in sync with "wrapper.conf" and also does changing "setenv.bat" requires rebuilding web apps on Windows or only when modifying "wrapper.conf".
Specifically, if I want to increase the Xmx value do I need to modify in both and then rebuild the service or maybe by modifying only "setenv.bat" I can avoid the need to rebuild the service?
The JVM_OPTS arguments in setenv.bat are not used when rebuilding the service. I would advise leaving that file alone, in M7 it is used to setup env variables used by other scripts/commands.
If you want to change Xmx Xms etc change them in the corresponding wrapper.conf for the target WebAppServer prior to running the powershell -file .\SASServiceCtl.ps1 -action install...
NOTE: you also need to remove the following hardcoded values from SASServiceCtl.ps
Removed hardcoded
"--JvmMs 1024 " +
"--JvmMx 4096 "
Else the service will not be updated with the values from the wrapper.conf. Once you re-install the service you can verify your changes by running
"D:\Program Files\SASHome\SASWebApplicationServer\9.4\apache-tomcat-9.0.55\bin\tomcat9w.exe" //ES//SAS-Config-Lev1-SASServer1_1-WebAppServer
The initial and max memory from the Java tab should be blank but you will see your updated values in the Java Options: box
Hi @angian
Thank you for the detailed reply!
The note you wrote about removing hardcoded JvmMs and JvmMx is interesting as I noticed myself in "server.log" that they were appended to the Tomcat startup and had no idea where this was coming from. I also could not find any SAS documentation saying to remove these two options - any idea why?
I will check your suggestion soon.
I don't see it in the official doc but looks like Tech Support has recently created a KB
https://sas.service-now.com/kb?id=kb_article_view&sysparm_article=KB0036153
I would hope this is either documented or fixed in M8+
The problem in that KB article was fixed in M8.
I faced this problem in 9.4M7
The article is wrong as it says "This is a known issue for SAS® 9.4M8 on Microsoft Windows." when it should state that this is a known issue for SAS 9.4M7 and was fixed in SAS 9.4M8.
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.