I get this weblogic.ejb20.cache.CacheFullException for my Weblogic 8.1 sp2.
The error doesn't come when I have around 150 records in the database. It always appears when the record count is > 200. I know the solution is to bump up the <<max-beans-in-cache> value and it did solve the problem when it was bumped up to 1000. But my question is, for just a single user and 200 records, does it need max-beans-in-cache > 200 ?
So, if the number of simultaneous users are like 20, then should the max-beans-in-cache value set to 20000? If each bean takes like 4K of memory, then my server will definitely run out of memory for such huge beans in cache number which will then bring out-of-memory excpetion, which cannot be dealt with.
Where can I bring optimization here? Is there something I can do with the Entity bean to keep the number of beans in cache low and still work around?
Originally posted by Kiran Kumar: So, if the number of simultaneous users are like 20, then should the max-beans-in-cache value set to 20000?
Not exactly. By simultaneous, I assume you mean more like "logged into the webapp" versus "actively operating on 200 beans in a transaction." The bean cache must be large enough to hold all beans currently participating in all transactions.
For example, if you have a transaction that will involve 200 beans, and you expect 10 users to invoke that transaction at the same time, then you'll need to set your cache to 2,000. If you expect to have at most 20 users logged into the application at once but each one doing different operations, then you can probably expect no more than 3 to perform that same transaction at once. Clearly, you'll have to work the numbers using your own data, but don't worry that you have to have all beans in the cache at the same time.