Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / April 2004

Tip: Looking for answers? Try searching our database.

JBoss 3.2.3: how to create 200 000 entity instances without out of mem?

Thread view: 
Marcus Beyer - 23 Mar 2004 11:44 GMT
We are trying to create (import) 200 000 CMP entity instances in JBoss.
We get always out of mem when around 10% is done.
JBoss 3.2.3 then consumes more than 700 MB of memory.

A new transaction is created for each instance -- so that can't be the
problem.

Any ideas?

thanx!
Marcus

here is our config:

 <container-configurations>
   <container-configuration>
    <container-name>Standard CMP 2.x EntityBean</container-name>
    <insert-after-ejb-post-create>true</insert-after-ejb-post-create>
    <container-cache-conf>

<cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>
      <cache-policy-conf>
        <min-capacity>50</min-capacity>
        <max-capacity>1000</max-capacity>
        <overager-period>150</overager-period>
         <max-bean-age>300</max-bean-age>
        <resizer-period>400</resizer-period>
        <max-cache-miss-period>60</max-cache-miss-period>
        <min-cache-miss-period>1</min-cache-miss-period>
        <cache-load-factor>0.75</cache-load-factor>
      </cache-policy-conf>
    </container-cache-conf>
    <container-pool-conf>
        <MaximumSize>1000</MaximumSize>
    </container-pool-conf>
    <commit-option>A</commit-option>
 </container-configuration>
</container-configurations
Marek Lange - 24 Mar 2004 09:16 GMT
> We are trying to create (import) 200 000 CMP entity instances in JBoss.
> We get always out of mem when around 10% is done.
> JBoss 3.2.3 then consumes more than 700 MB of memory.

Did you increase the max heap value of the VM (-Xmx)?

>       <cache-policy-conf>
>         <min-capacity>50</min-capacity>
[quoted text clipped - 13 lines]
>  </container-configuration>
> </container-configurations>

You should increase the cache size much more if you use the commit
option A. Keep an eye on the cache numbers in web-console.

-marek
Marcus Beyer - 26 Mar 2004 09:35 GMT
>> We are trying to create (import) 200 000 CMP entity instances in JBoss.
>> We get always out of mem when around 10% is done.
>> JBoss 3.2.3 then consumes more than 700 MB of memory.
>
> Did you increase the max heap value of the VM (-Xmx)?

Yes, I did.

Using a memory profiler I discovered the problem: it was not JBoss
or my configuration. The memory leak is in IronEye SQl, a JDBC
statistics tool. Here is my Bugzilla entry:

<http://bugzilla.irongrid.com/show_bug.cgi?id=253>

> You should increase the cache size much more if you use the commit
> option A. Keep an eye on the cache numbers in web-console.

Thank you. I only decreased it because of my memory problem ...

Grüße,
Marcus
Grzegorz Glowaty - 01 Apr 2004 14:32 GMT
> We are trying to create (import) 200 000 CMP entity instances in JBoss.
> We get always out of mem when around 10% is done.
[quoted text clipped - 4 lines]
>
> Any ideas?

You problem is probably Hypersonic DB (bundled with jboss).
It's configured to be in memory-db as default so all data is stored is in
the memory.
Switch to another db or configure hsql to work on disk.

   greg
Marcus Beyer - 01 Apr 2004 20:06 GMT
>>We are trying to create (import) 200 000 CMP entity instances in JBoss.
>>We get always out of mem when around 10% is done.
[quoted text clipped - 9 lines]
> the memory.
> Switch to another db or configure hsql to work on disk.

I am using PostgreSQL. As I already said I solved the problem:
"
Using a memory profiler I discovered the problem: it was not JBoss
or my configuration. The memory leak is in IronEye SQl, a JDBC
statistics tool. Here is my Bugzilla entry:

<http://bugzilla.irongrid.com/show_bug.cgi?id=253>
"

Thank you anyway!

Marcus
Grzegorz Glowaty - 02 Apr 2004 10:01 GMT
> I am using PostgreSQL. As I already said I solved the problem:
> "
[quoted text clipped - 4 lines]
> <http://bugzilla.irongrid.com/show_bug.cgi?id=253>
> "

Ah I haven't noticed it. It just seemed similar to the problem ppl have with
hsql.
Greetings,
   greg


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.