Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
memory leak using annotation based caching Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • memory leak using annotation based caching

    Hello,
    Using the declaritive caching like so: @Cacheable(modelId="myModel")
    We get a pretty serious memory leak. It seems we get a MetadataCacheAttributeSource that is just growing and growing. We get a similarily huge synchronized map indicating that the metadata caching attributeMap in that class is getting huge. We only have a few classes with some 20 annotated methods.

    The caching is working fine but this memory leak is killing us.

    Our springconfig looks like so.

    <bean id="cacheProviderOsCache" class="org.springmodules.cache.provider.oscache.Os CacheFacade">
    <property name="cacheManager" ref="cacheAdministrator" />
    </bean>

    <oscache:annotations providerId="cacheProviderOsCache" >
    <oscache:caching id="myModel1" refreshPeriod="1800" />
    <oscache:caching id="myModel2" refreshPeriod="1800" />
    </oscache:annotations>

    <bean id="cacheAdministrator" class="com.opensymphony.oscache.general.GeneralCac heAdministrator" destroy-method="destroy" scope="singleton">
    <constructor-arg index="0">
    <props>
    <prop key="cache.memory">true</prop>
    <prop key="cache.capacity">2000</prop>
    <prop key="cache.algorithm">com.opensymphony.oscache.bas e.algorithm.LRUCache</prop>
    <prop key="cache.blocking">false</prop>
    </props>
    </constructor-arg>
    </bean>

  • #2
    Without being all cryptic and mysterious I don't expect anything to happen in the next couple of months, however things should get pretty interesting after that...

    If you want to fix it yourself in the meantime, why not submit a JIRA?

    Comment


    • #3
      I smell mysteriousness.. Anyhow couldnt find any solution to the probem so "fixed" it by stop using annotations.

      Comment


      • #4
        Originally posted by groden View Post
        Hello,
        Using the declaritive caching like so: @Cacheable(modelId="myModel")
        We get a pretty serious memory leak. It seems we get a MetadataCacheAttributeSource that is just growing and growing. We get a similarily huge synchronized map indicating that the metadata caching attributeMap in that class is getting huge. We only have a few classes with some 20 annotated methods.

        The caching is working fine but this memory leak is killing us.

        ...
        Hi,

        is there any solution for this memory leak problem?
        We have got the same problem here. We’re using EhCache instead of oscache, the result is the same.

        The synchronized map in MetadataCacheAttributeSource contains a lot of data – in our case 600-700 Mbytes.


        (And, when is the release date of version 0.10 of Spring Modules (Cache)?)

        Thanks,
        mb1

        Comment

        Working...
        X