Menu

Оптимизация запуска Tomcat

Max touch
2017-10-13
2017-10-13
  • Max touch

    Max touch - 2017-10-13

    Для ускорение времени запуска/остановки Tomcat сервера со множеством задеплоинных приложений

    Нужно в server.xml добавить строчку
    <Engine defaultHost="localhost" name="Catalina" startStopThreads="0">

    The number of threads this Engine will use to start child Host elements in parallel. The special value of 0 will result in the value of Runtime.getRuntime().availableProcessors() being used. Negative values will result in Runtime.getRuntime().availableProcessors() + value being used unless this is less than 1 in which case 1 thread will be used. If not specified, the default value of 1 will be used.

    https://tomcat.apache.org/tomcat-7.0-doc/config/engine.html

    <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true" startStopThreads="0">

    The number of threads this Host will use to start child Context elements in parallel. The same thread pool will be used to deploy new Contexts if automatic deployment is being used. The special value of 0 will result in the value of Runtime.getRuntime().availableProcessors()being used. Negative values will result in Runtime.getRuntime().availableProcessors() + value being used unless this is less than 1 in which case 1 thread will be used. If not specified, the default value of 1 will be used.

    https://tomcat.apache.org/tomcat-7.0-doc/config/host.html

     

    Last edit: Max touch 2017-10-13
  • Max touch

    Max touch - 2017-10-27

    Если ваши приложения не используют TLD
    Ускорить запуск сервиса Tomcat можно многократно, запретив парсинг TLD внутри приложений, для этого на разработческих машинах нужно в
    TOMCATHOME/conf/catalina.properties
    установить свойство
    org.apache.catalina.startup.ContextConfig.jarsToSkip=*.jar

    Подробнее

     

    Last edit: Max touch 2017-10-27

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.