aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes CacheFullException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "CacheFullException" Watch "CacheFullException" New topic
Author

CacheFullException

Kiran Kumar
Ranch Hand

Joined: Jan 06, 2003
Posts: 91
Hello,

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?

Thanks,
Kiran


------------<br />SCJP
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
This thread s'd ideally in Weblogic forum.

That apart,

No I dont think that you have a choice here. You should be in a position to predict the number of beans that are needed during maximum load. Yeah so you do need a machine with lots of memory.
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
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.
 
 
subject: CacheFullException