db-ojb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mananthakris <mananthak...@gmail.com>
Subject Re: OutOfMemoryError with Proxy
Date Thu, 07 Dec 2006 17:16:53 GMT

Thanks for the quick response.We are using OJB1.0rc4. yes we can use
getObjectByIdentity. But the stack trace of the error shows that
getObjectByQuery is internally calling getObjectByIdentity,so did not think
this would help. How can we find how many objects are materialized at a
given time? 
Here since it is byPrimarykey i am assuming at this point of time it is
trying to materialize only one object or its all related objects too.

Also what does that the stack trace mean by saying that getObjectByIdentity
calls getReferencedObject and persistenceBrokerImpl.retrieveCollections
(does it try to get all related objects if an object is requested?)

Attached is the OJB.properties file and our repository file


Armin Waibel wrote:
> 
> Hi,
> 
> could you post the OJB.properties and jdbc-connection-descriptor too? 
> This would help to find problematic settings.
> Which version of OJB do you use?
> 
> mananthakris wrote:
>> Hi,
>> We are using OJB with Jboss,Mysql on linux.
>> We have implemented all we could as suggested by OJB performance
>> tutorial.
>> We are using Proxies,default cache,PB-api,odmg transaction,but we can't
>> use
>> getIteratorByQuery because the results are processed after the
>> transaction
>> is closed. We are facing outofmemory error in two places always. One
>> while
>> materializing subject from proxy and two using getObjectByQuery for
>> finding
>> an object by primarykey. 
> 
> Isn't it possible to lookup the object by Identity instead of using a
> query?
> http://db.apache.org/ojb/docu/tutorials/pb-tutorial.html#Find+object+by+primary+key
> 
> 
>> It happens only if a lot of users around 200 are
>> using the system. 
> 
> How many objects are materialized?
> 
> regards,
> Armin
> 
>> We have two tier systems with jboss running on a linux
>> machine with 4GB ram and we have also finetuned jvm options that has
>> reduced
>> frequency of OutOfMemoryError (we use -Xms768M -Xmx768M -XX:NewSize=256M)
>> Any suggestions are appreciated? Should we be looking at mysql
>> performance,any good tools for profiling ojb?
>> Here is the stack trace of two errors
>> 1)java.lang.OutOfMemoryError
>> rethrown as
>> org.apache.ojb.broker.PersistenceBrokerException
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.retrieveCollection(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.retrieveCollections(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getDBObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getExtentDBObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getDBObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByIdentity(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getReferencedObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.retrieveReference(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.retrieveReferences(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getDBObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByIdentity(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByIdentity(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByIdentity(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.accesslayer.IndirectionHandler.materializeSubject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.accesslayer.IndirectionHandler.getRealSubject(Unknown
>> Source)
>>         at org.apache.ojb.broker.VirtualProxy.getRealSubject(Unknown
>> Source)
>>         at
>> com.tk20.bo.BaseServerObjectProxy.realSubject(BaseServerObjectProxy.java:46)
>>         at
>> com.tk20.bo.BaseServerObjectProxy.getRelatedObjects(BaseServerObjectProxy.java:334)
>>         at
>> com.tk20.ejb.api.query.QueryMgrEJB.getList(QueryMgrEJB.java:83)
>> 
>> 2)java.lang.OutOfMemoryError
>> rethrown as
>> org.apache.ojb.broker.PersistenceBrokerException
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.retrieveCollection(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.retrieveCollections(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getDBObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getExtentDBObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getDBObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByIdentity(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getReferencedObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.retrieveReference(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.retrieveReferences(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getDBObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getExtentDBObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getDBObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByIdentity(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getReferencedObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.retrieveReference(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.retrieveReferences(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getDBObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getExtentDBObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getDBObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByIdentity(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getReferencedObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.retrieveReference(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.retrieveReferences(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getDBObject(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByIdentity(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByQuery(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(Unknown
>> Source)
>>         at
>> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(Unknown
>> Source)
>>         at
>> com.tk20.ejb.api.BaseServiceEJB.findByPrimaryKey(BaseServiceEJB.java:189)
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 
http://www.nabble.com/file/4504/OJB.properties OJB.properties 
http://www.nabble.com/file/4505/repository.xml repository.xml 
http://www.nabble.com/file/4506/repository_user.xml repository_user.xml 
http://www.nabble.com/file/4507/repository_internal.xml
repository_internal.xml 
-- 
View this message in context: http://www.nabble.com/OutOfMemoryError-with-Proxy-tf2775405.html#a7743488
Sent from the Apache DB - ObjectRelationalBridge Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Mime
View raw message