'ENABLE_CLEAR_REFERENCES'에 해당되는 글 1건

  1. 2010.07.30 Tomcat Clear peference 사용시 날 수 있는 부작용 (side effect)

Tomcat에 clear peference를 이용하여 최대한 reloading시 메모리릭이 나지 않도록 하였다.

http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html
org.apache.catalina.loader. WebappClassLoader.ENABLE_CLEAR_REFERENCES

If true, Tomcat attempts to null out any static or final fields from loaded classes when a web application is stopped as a work around for apparent garbage collection bugs and application coding errors.

There have been some issues reported with log4j when this option is true.

Applications without memory leaks using recent JVMs should operate correctly with this option set to false.

If not specified, the default value of true will be used.



하지만 이 부분은 약간의 Exception 을 일으킬 수 있으니. 참조하세요.
ConcurrentModificationException이 발생될 수 있습니다.^^


Jul 8, 2010 4:28:24 PM org.apache.catalina.startup.HostConfig checkResources
WARNING: Error while removing context [/xxx]
java.util.ConcurrentModificationException
    at java.util.HashMap$HashIterator.nextEntry(HashMap.java:810)
    at java.util.HashMap$EntryIterator.next(HashMap.java:851)
    at java.util.HashMap$EntryIterator.next(HashMap.java:849)
    at java.util.HashMap.putAllForCreate(HashMap.java:452)
    at java.util.HashMap.clone(HashMap.java:686)
    at
org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1633)
    at
org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1536)
    at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:707)
    at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4611)
    at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924)
    at
org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1115)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1323)
    at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)
    at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
    at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
    at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
    at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
    at java.lang.Thread.run(Thread.java:636)



'Web service' 카테고리의 다른 글

mod_proxy 이용  (0) 2010.07.30
High Performance Web 관련  (0) 2010.07.30
Tomcat Clear peference 사용시 날 수 있는 부작용 (side effect)  (0) 2010.07.30
웹 서버 튜닝 좋은 사례  (0) 2010.07.22
Nexus 설치하기  (0) 2010.07.21
Nosql 정보  (0) 2010.07.21
Posted by 김용환 '김용환'