Soft Lock Cache Expired in Ehcache

Hibernate 3.3.x, ehcache 2.2.x

The following error occurred when I try to publish multiple users at a time. Any idea on why this will happen and how to fix it? Is there a way to disable this cache before mass loading users, if so, how can I do this?

17:17:50,140 WARN [AbstractReadWriteEhcacheAccessStrategy] Cache persistence.unit:unitName=my.ear/my-ejb-1.0.0.jar#my.com.mycompany.User.phones Key com.mycompany.User.phones#9915 Lockable : null A soft-locked cache entry was expired by the underlying Ehcache. If this happens regularly you should consider increasing the cache timeouts and/or capacity limits 

EDIT1:

This error occurs when I try to load most of the users into the database through JPA calls. I do not close the cache manager by scrolling down.

+6
source share
3 answers

From the description, it seems that the second level cache for your objects is filling up, and some of them are being forced out of the main ehcache prematurely. Do you periodically flush and clear Session hibernation during your insertion, as indicated in the documentation ?

+2
source

Increase maxElementsInMemory to 0. For more help see this.

0
source

Source: https://habr.com/ru/post/885979/


All Articles