On 16 May 2018 23:01:14 BST, sri devops <sri.devop...@gmail.com> wrote:
>Thanks Mark, your answer is very helpful. I tried many scenarios using
>your
>inputs.
>
>I want Tomcat to NOT perform reload but it needs to perform a redeploy
>when
>context.xml is changed. So i set autoDeploy=true and commented out
>below
>section in context.xml to server my purpose.
>
><WatchedResource>WEB-INF/web.xml</WatchedResource>
><WatchedResource>${catalina.base}/conf/web.xml</WatchedResources>
>
>Now what i noticed is, while tomcat and application are in running
>state,
>if i removed /opt/apache-tomcat-8.5.23/webapps/cp directory, Tomcat is
>trying to redeploy which is good but it hung at below error
>
>*SEVERE: The web application [cp] created a ThreadLocal with key of
>type
>[java.lang.ThreadLocal] (value [java.lang.ThreadLocal@5640c1bb) and a
>value
>of type [foo.context.ServiceToken] (value [Unknow] ) but failed to
>remove
>it when the web application was stopped. Threads are going to be
>renewed
>over time to try and avoid a probable memory leak.*
>
>In order to get rid of this error, i manually need to stop / forcefully
>kill PID for the tomcat and then start tomcat to perform a redeploy
>---> So
>here there's a human interaction of manually stopping tomcat and
>starting
>it (not serving the purpose of redeploy). Do you have any thoughts or
>suggestions in this scenarios ?

Fix the memory leak in your web application.

Mark


>
>Thanks,
>Srinath.
>
>
>On Fri, May 11, 2018 at 11:44 AM Mark Thomas <ma...@apache.org> wrote:
>
>> On 08/05/18 19:07, sri devops wrote:
>> >  Hello Team,
>> >
>> > Currently I have apache-tomcat-8.5.23 installed and running on
>> > RHEL7.x86_64. I have a war deployed and application is running
>under
>> > tomcat. While application is running, if i make any manual changes
>to
>> some
>> > config files [ context.xml or server.xml or web.xml] and noticed
>Tomcat
>> is
>> > restarting application even though I haven't called tomcat service
>start
>> > script.
>>
>> Changes to server.xml do not trigger web application reload or
>redeploy.
>> Neither does it trigger a Tomcat restart.
>>
>> Changes to web.xml trigger a web application reload because of the
>> default watched resources (see CATALINA_BASE/conf/context.xml) and
>> because autoDeploy is true by default.
>>
>> Changes to context.xml will trigger a web application redeploy
>because
>> autoDeploy is true by default.
>>
>>
>> > My intention is,
>> > 1) At first when there's initial war deployed and tomcat service
>start
>> > script is called, tomcat should extract war and app should work
>> > 2) Second, While tomcat is in running state and application is
>running
>> and
>> > if i make any manual changes to any tomcat config file, I do not
>want
>> > application to auto magically restart.
>> >
>> > *my server.xml looks as below*
>> >
>> > <Host name="localhost" appBase-"webapps"
>> >            unpackWARs="true" autoDeploy="true">
>> >
>> >
>> > I also looked at your docs and researched online, but unclear on
>these
>> > parameters what to use when. [ setting autoDeploy=false (or) having
>> > deployIgnore attribute somewhere ?]
>>
>> Set autoDeploy to false.
>>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to