I am upgrading to Tomcat 7 and testing some things out. I have an environment in which classes are recompiled often and deployed to the server causing Tomcat to reload fairly often. This has all worked great in Tomcat 5 and Tomcat 6.
In Tomcat 7 if I try to access a class (servlet) in a particular servlet context via a web browser while tomcat is in the process of reloading the context, I get an HTTP Status 404 error. In the previous versions of Tomcat, if I tried to access a servlet while tomcat is reloading, this did not happen. Instead it appeared that Tomcat was still able to accept the request, wait until the context has finished loading and then process the request finally returning the desired response to the browser (no error).
I see that someone reported this exact same bug for Tomcat 6 and it was eventually was resolved in a later version: https://issues.apache.org/bugzilla/show_bug.cgi?id=43683. Can anyone tell me if they have seen this in Tomcat 7 or if they have any recommendations on some config or fix that may help me resolve this? Perhaps this is something that once again is a bug that needs to be addressed?
I obviously have a copy of the "buggy" Tomcat 6, then. I've been taking it as a given that when I do a hot-redeploy there will be a period when the app is unavailable. After all, the actual process is that the old copy of the app is shut down, then the new copy is started up, and there will be a short period of time when the app effectively isn't there. Since I'm far more likely to get caught by the PermGenSpace issue, I never thought twice about it.
With the addition of versioning support in Tomcat7, I can see how that might be different, though.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Dec 09, 2011
Thanks for the response. Regarding your PermGenSpace comment, I was plagued by that for the longest time and even upgrading to Tomcat 7 did not resolve it though is seems it may have helped a little. I know there are many different causes of PermGen errors but I finally seemed to resolve mine by moving my jdbc drivers out of the application context (WEB-INF/lib) and into Tomcat/lib. Have not received a PermGen error since.
Hopefully there is something that can be done about the Tomcat 7 context reload 404 error though! That is definitely going to be a problem for me.
subject: Tomcat 7 404 Error when accessing application during context reload