tomcat啓動掃描致使啓動過慢

tomcat在啓動的時候每次到這個地方都要等待很長時間apache

2018-04-25 02:33:37,449 [main] INFO  org.apache.catalina.core.StandardEngine- Starting Servlet Engine: Apache Tomcat/7.0.70
2018-04-25 02:33:37,449 [main] INFO  org.apache.catalina.core.StandardEngine- Starting Servlet Engine: Apache Tomcat/7.0.70
2018-04-25 02:57:10,655 [localhost-startStop-1] INFO  org.apache.catalina.startup.TldConfig- At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2018-04-25 02:57:10,655 [localhost-startStop-1] INFO  org.apache.catalina.startup.TldConfig- At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

能夠看到TLD scan竟然花了24分鐘之多 看了一圈資料 https://blog.csdn.net/renfufei/article/details/70878077 這玩意竟然還會掃描兩次 究竟是什麼緣由致使的掃描如此的慢? 開始排除外部因素,啓動以前再也不掛載mfstomcat

/data/www/app/latest/WEB-INF/uploads

mfs的文件總量19GB左右,全量掃描一次若是在同一機房須要5-10分鐘,若是不在同一機房,速度按理爲指數級降低。 當不掛載mfs直接啓動應用,應用啓動在20s內就能夠完成,也就是說tomcat啓動很慢的緣由是掃描了mfs目錄引發的。 不過很遺憾,沒有比較妥善的解決辦法,tomcat7測試了各類跳過掃描的配置,沒一個生效可用 目前有兩個解決辦法app

  1. 延遲掛載mfs,讓tomcat先啓動
  2. mfs掛載目錄放到WEB-INF以外
相關文章
相關標籤/搜索