Elliot Metsger wrote:
> We've noticed issues with heap size as well, specifically when using the
> wildcard policy tool, the media filter manager, and some in-house tools that
> iterate over dspace objects using a single Context.
>
> When dspace objects like Item or Bitstream are instantiated, they place a
> reference to itself in a hash map attached to the context.  So over time
> that map will get large.  We modified the tools to clear the context "cache"
> when they were done operating on the dspace object.

As you say above, single Context. The HashMap is eligible for garbage 
collection once you no longer use that Context. So you will only build 
up a large cache if you are using a SINGLE Context over a long period of 
time. (As a rough guide, for requests to the web interface there will be 
a single Context used for each request, for the duration of that request).

But Context's that are held open for a very long time have the potential 
to run into all sorts of other issues - dropping of idle database 
connections, lock contentions/waits, excessive database resource usage.

And any error in that long run could cause the entire process to be 
rolled back - which may not be the best course of action.

If you are running anything that takes an excessive amount of time, it's 
better to really consider if there are better ways you can be using 
(/releasing) contexts, before jumping to clear the cache.

G

 
 
This e-mail is confidential and should not be used by anyone who is not the 
original intended recipient. BioMed Central Limited does not accept liability 
for any statements made which are clearly the sender's own and not expressly 
made on behalf of BioMed Central Limited. No contracts may be concluded on 
behalf of BioMed Central Limited by means of e-mail communication. BioMed 
Central Limited Registered in England and Wales with registered number 3680030 
Registered Office Middlesex House, 34-42 Cleveland Street, London W1T 4LB
This email has been scanned by Postini.
For more information please visit http://www.postini.com


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to