Hi, our system consists on about 80+ webapps on different servers. Multiple webapps are deployed per Tomcat server remotely using the manager and host-manager webapps.

This has been working fine for years, however some servers now have 5+ webapps and they are taking a long time to start. We invoke the deploy command on the manager webapp in parallel for each webapp, in order to attempt a reduction in total server startup time. However the speedup is very modest. The servers have powerful Xeon multi-core servers so a parallel speedup should be possible.

Looking at the source code for org.apache.catalina.manager.ManagerServlet we see that the following method is synchronized which would explain the behaviour we are seeing:
    protected synchronized void deploy
        (PrintWriter writer, String config, ContextName cn,
         String tag, boolean update, HttpServletRequest request,
         StringManager smClient) {

Is there any real reason why this needs to be synchronized? Tomcat can deploy webapps in parallel when backgroundProcessorDelay is set to a positive number, but this is not useful when remotely deploying webapps using the manager webapp.

Any ideas? Thanks

*Manuel Dominguez Sarmiento*

Reply via email to