java - Ehcache write-behind caching thread-priority -


i'm trying use ehcache write-behind caching write batches of transactions database. need write-behind cache dump transactions @ 5 second intervals (or more often).

i must missing something, because try might, won't work. set write-behind caching, , put load onto server. thousands, , hundreds of thousands of transactions later, , after waiting several minutes, there still nothing in database. isn't until shut down load on server cache begins writing database.

is problem thread-priority? there way modify ehcache perform db writes when server under load?

here configuration:

<cache name="server.db.model.request"  maxelementsinmemory="10000"  eternal="false"  timetoidleseconds="5"  timetoliveseconds="5"  overflowtodisk="false"  memorystoreevictionpolicy="fifo">     <cachewriter writemode="write_behind" maxwritedelay="5" ratelimitpersecond="5"      writecoalescing="true" writebatching="true" writebatchsize="5000"      retryattempts="2" retryattemptdelayseconds="10">         <cachewriterfactory class="server.db.util.requestcachewriterfactory"/>      </cachewriter> </cache> 

thanks.

hmmm... that's weird. have been doing extensive testing , have never experienced writer thread never getting cpu time. os running ? thread creating cachemanager running @ lower priority ?

also, sorry maybe asking obvious, when "shut down" load mean ? not shutting app (and cachemanager) down ? asking "transaction demarcation happen within writeall/deleteall method, right ?"…

one last remark well, tagged hibernate, didn't configure write-behind on hibernate 2nd level cache right ? that's wrong tag, isn't ?


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -