Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-12729

Do not use global tmp-dir for less-cache file

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Major
    • None
    • 7.2
    • LESS
    • None
    • Unknown

    Description

      It seems the less-compiler uses some caching file in the (global) tmp dir (System.getProperty("java.io.tmpdir") )
      Some servlet containers (e.g. the jetty-hsql) distribution leave this system property at the default value (e.g. /tmp under Linux), causing two instances running on the same machine to "share" that cache file

      Symptoms:
      when running two xwiki instances one might get OoM when restatign one of the servers, like:

      Caused by: java.lang.OutOfMemoryError: Java heap space
              at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57) ~[na:1.8.0_45]
              at java.nio.ByteBuffer.allocate(ByteBuffer.java:335) ~[na:1.8.0_45]
              at org.infinispan.persistence.file.SingleFileStore.rebuildIndex(SingleFileStore.java:205) ~[infinispan-core-7.2.5.Final.jar:7.2.5.Final]
              at org.infinispan.persistence.file.SingleFileStore.start(SingleFileStore.java:126) ~[infinispan-core-7.2.5.Final.jar:7.2.5.Final]
              at org.infinispan.persistence.manager.PersistenceManagerImpl.start(PersistenceManagerImpl.java:129) ~[infinispan-core-7.2.5.Final.jar:7.2.5.Final]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
              at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
              at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:168) ~[infinispan-commons-7.2.5.Final.jar:7.2.5.Final]
              at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:869) ~[infinispan-core-7.2.5.Final.jar:7.2.5.Final]
              at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:638) ~[infinispan-core-7.2.5.Final.jar:7.2.5.Final]
              at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:627) ~[infinispan-core-7.2.5.Final.jar:7.2.5.Final]
              at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:530) ~[infinispan-core-7.2.5.Final.jar:7.2.5.Final]
              at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:218) ~[infinispan-core-7.2.5.Final.jar:7.2.5.Final]
              at org.infinispan.cache.impl.CacheImpl.start(CacheImpl.java:853) ~[infinispan-core-7.2.5.Final.jar:7.2.5.Final]
              at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:599) ~[infinispan-core-7.2.5.Final.jar:7.2.5.Final]
              at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:554) ~[infinispan-core-7.2.5.Final.jar:7.2.5.Final]
              at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:424) ~[infinispan-core-7.2.5.Final.jar:7.2.5.Final]
              at org.xwiki.cache.infinispan.internal.InfinispanCache.<init>(InfinispanCache.java:73) ~[xwiki-platform-cache-infinispan-7.3-milestone-1.jar:na]
              at org.xwiki.cache.infinispan.internal.InfinispanCacheFactory.newCache(InfinispanCacheFactory.java:170) ~[xwiki-platform-cache-infinispan-7.3-milestone-1.jar:na]
              at org.xwiki.lesscss.internal.cache.DefaultLESSResourcesCache.initialize(DefaultLESSResourcesCache.java:58) ~[xwiki-platform-lesscss-default-7.3-milestone-1.jar:na]
              at org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39) ~[xwiki-commons-legacy-component-default-7.3-milestone-1.jar:na]
      

      Workaround: delete the /tmp/xwiki/lesscss.skinfiles.cache.dat file manually.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              camil7 Clemens Robbenhaar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: