tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sri devops <sri.devop...@gmail.com>
Subject Re: Help with Tomcat Automatic Application Deployment
Date Thu, 17 May 2018 16:03:04 GMT
Sure i will work in fixing the memory leak and i have another QQ.

Now that I set autoDeploy=false in order to have more control on my tomcat. I
stopped Tomcat, deploy war file and started tomcat and tomcat is extracting
the war just fine without having deployOnStartup attribute stated anywhere. As
i grep for "deployOnStartup" value and couldn't find anywhere in my
configuration, and deployments on start-up is working just fine.


   - Do i need to specifically set deployOnStartup=true,  For happening
   deployments on Tomcat startup ? Or is deployOnStartup=true (by default in
   tomcat) ?
   - Also if autoDeploy is set to false, are there any other unknown
   impacts that might happen which needs to be considered ?



Thanks,
Srinath

On Thu, May 17, 2018 at 10:48 AM Mark Thomas <markt@apache.org> wrote:

> On 16 May 2018 23:01:14 BST, sri devops <sri.devops78@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 <markt@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-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message