-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Item Expired by cache while locked
PostPosted: Wed Nov 08, 2006 4:42 am 
Newbie

Joined: Thu Jun 01, 2006 2:20 pm
Posts: 2
Hi,
I was running a batch job to persist and merge about 32000 rows of data (each row corresponds to 1 parent object with about 5 associations).

The batch completed successfully in about 2100 seconds, but I got a lot of warnings after the job completes:

Code:
WARN  ReadWriteCache - An item was expired by the cache while it was locked (increase your cache timeout): someObject#xxxxxxx
WARN  ReadWriteCache - An item was expired by the cache while it was locked (increase your cache timeout): someObject#xxxxxxx
WARN  ReadWriteCache - An item was expired by the cache while it was locked (increase your cache timeout): someObject#xxxxxxx
.....
.....
.....


The data seems to be persisted in the DB correctly.

What is the impact of this and how do we get rid of the warnings?

the warning says (increase your cache timeout), but my ehcache is set to eternal=true.

Here's my ehcache.xml
Code:
<ehcache>
    <diskStore path="java.io.tmpdir"/>
    <defaultCache
            maxElementsInMemory="100000000"
            eternal="true"
            overflowToDisk="false"
            timeToIdleSeconds="0"
            timeToLiveSeconds="0"
            diskPersistent="false"
            diskExpiryThreadIntervalSeconds="120"
            />
</ehcache>


I've also tried setCacheMode(CacheMode.IGNORE) but Warnings are still there...[/code]


Top
 Profile  
 
 Post subject: Re: Item Expired by cache while locked
PostPosted: Wed Sep 01, 2010 5:34 am 
Newbie

Joined: Tue May 18, 2010 5:39 am
Posts: 19
The warning has no impact on the current db action (insert, update, delete). Its basically a cache miss. However with the next transaction the object will be loaded from the db, and this is a db overhead.

Hence options are :

1. increase your cache size if possible.
2. or use a deterministic evictor to avoid (can still occur) the problem by specifying the java -Dnet.sf.ehcache.use.classic.lru=true system property while starting your application.
3. Or use memoryStoreEvictionPolicy="LRU" in your ehcache xml.

Read more about it at : http://ehcache.org/EhcacheUserGuide.html#id.s27.8.8

_________________
AG
http://anshuiitk.blogspot.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.