Chris,

On 4/2/2014 1:54 PM, Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mark,

On 4/2/14, 4:30 PM, Mark Eggers wrote:
Chris,

On 4/2/2014 1:05 PM, Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256

Chuck,

On 4/2/14, 8:21 AM, Caldarale, Charles R wrote:
From: Elias Kopsiaftis [mailto:yemi...@gmail.com] Subject:
tomcat randomly undeploys and redeploys the applications

I deploy the application, then in the log file catalina.out i
get many messages from WebappClassLoader
clearReferencesThreads saying threads appear to have started
but have failed to stop

This is an indication that your webapp is not managing its
threads properly.

then finally, Ill get a message from HostConfig
checkResources that says its undeploying the context, and
then it redeploys.

This is sometimes caused by incorrect timestamps on the bits of
the webapp that Tomcat monitors, or an incorrect clock setting
on the system Tomcat is running on.  The mismatch makes it
appear that the webapp is being updated continuously.

I've found that in development, a single update can cause Tomcat
to go into a loop of redeployments, re-deploying my web
application every few seconds or so. If I let it go, it does
finally stop reloading and settle down.


Can you describe your development environment a little bit, and
any thoughts as to what might trigger this loop of redeployments?

I use Eclipse for development, but our "real" build process is
ant-based. We have some watched resources configured outside the
default (stuff like Struts config files, etc.).


Ah, makes sense.

When I do a build while Tomcat is running, usually I get one webapp
reload, but sometimes I get a series of reloads. It usually gets so
irritating (our webapp takes about 10 seconds to reload) that I just
kill Tomcat and immediately restart it. It starts up once and all is
well after that.


Yep, and in the process more files are copied about, and that triggers another reload.

Fun, fun.

I've not seen this, but it could explain some issues some the
developers I support are seeing.

It definitely happens, and I never remember to enable the DEBUG
logging to find out what resource it thinks has been updated until
after it happens, at which point I just don't care. Perhaps I should
enable it right now :)

- -chris

I've managed to make this happen in my environment now (NetBeans 7.4, Maven 3.2.1, Tomcat 7.0.42 - all will be upgraded soon). I just needed an application that takes a bit longer to load. I only managed to trigger two reloads, so it's not much of an issue.

Maybe look at adding the backgroundProcessorDelay attribute to the context? I don't know what would happen if the context got a string of reload requests within the delay interval. Would it queue them up one after the other, or would it just execute one?

/mde/

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

Reply via email to