I placed the JVM options through JAVA_OPTS in the catalina.sh file in the catalina database. However, the system does not select these parameters - I am trying to transfer profiling information to set paths for project properties and file logging. I have to set the parameters in setenv.sh in a separate bin instance. Even the echo command that I put in catalina.sh to view JAVA_OPTS does not get printable defaults such as CATALINA_BASE, etc. type. Is .sh catalysis even being processed?
At the end of the day, my system works fine with setenv.sh. I am curious why JAVA_OPTS are not matched with catalina.sh.
I am using Ubuntu 12.04 with TOMCAT 7 and JDK 1.7 installed.
thank
You should not edit the catalina.sh file - it is listed in this file. Instead, set your variables with smooth env , create the setenv.sh file in the same directory as Catalina.sh (CATALINA_BASE / bin) and write your code.
I had to set the JAVA_OPTS variable myself, and I created the bin / setenv.sh file, set it to executable chmod +x bin/setenv.shand wrote in it:
chmod +x bin/setenv.sh
JAVA_OPTS = "$JAVA_OPTS -Xms128m -Xmx512m -server"
which set my initial allocated memory to 128 and the maximum memory to 512 MB. And he worked.
edit: /etc/default/tomcat7or/etc/default/{user_who_runs_tomcat}
/etc/default/tomcat7
/etc/default/{user_who_runs_tomcat}
eg:.
*JAVA_OPTS="-Djava.awt.headless=true -Xmx2G -XX:+UseConcMarkSweepGC -server -XX:MaxPermSize=384m"*
catalina.sh - , , , . setenv.sh , , : , tomcat - catalina.sh. , tomcat setenv.sh, .
catalina.sh
setenv.sh
, CATALINA_OPTS JAVA_OPTS: , tomcat. JAVA_OPTS="-Xmx16G -Xms16G", 16- tomcat. shutdown JVM JAVA_OPTS. CATALINA_OPTS ( JAVA_OPTS), , , /, tomcat - shutdown.sh.
CATALINA_OPTS
JAVA_OPTS
JAVA_OPTS="-Xmx16G -Xms16G"
Source: https://habr.com/ru/post/1548252/More articles:JSON object via jQuery message for php - jsonexecution order in case of multiple inheritance - c ++How to use callback mechanism? - javaC convert floating point to int - cClosure Compiler does not always include listings. What for? - javascriptCinema 4d R13.dae не будет импортировать в SceneKit - scenekitLegend of a survival plan - rSmooth polygons of Three.js model - javascriptposition: absolute bottom: 0 does not work when centering text on an image - htmlhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1548257/mongodb-nodejs-each-vs-toarray&usg=ALkJrhiZ-7kzwfQxhZUWib1x0ya2ub4XrAAll Articles