#495: Metadata services cause out of memory issue
---------------------------------------+------------------------------------
Reporter: rupert | Owner: geonetwork-devel@…
Type: defect | Status: new
Priority: major | Milestone: v2.6.5
Component: General | Version: v2.6.3
Keywords: xml services, heap memory |
---------------------------------------+------------------------------------
The metadata services metadata.insert and metadata.update never release
the memory they use, so after repeated use Geonetwork runs out of heap
space.
I am trying to automate the population of GeoNetwork and the services work
fine until the heap space is used up. If I increase the heap, more records
can be processed but the memory is never released and it will eventually
hang GeoNetwork.
Services used, metadata.insert, metadata.update, xml.search
Could some check to see if the code just forgot to deallocate the memory
used in this service.
Thanks.
--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/495>
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/>
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.
#495: Metadata services cause out of memory issue
----------------------+-----------------------------------------------------
Reporter: rupert | Owner: geonetwork-devel@…
Type: defect | Status: closed
Priority: major | Milestone: v2.6.5
Component: General | Version: v2.6.3
Resolution: invalid | Keywords: xml services, heap memory
----------------------+-----------------------------------------------------
Changes (by simonp):
* status: new => closed
* resolution: => invalid
Comment:
Actually metadata.insert and metadata.update all forward to metadata.edit
- metadata.edit will store the metadata record in the session and release
it when the user saves the record - this is the intended behaviour as they
are used by the user interface.
Shouldn't you be using xml.metadata.insert (this is basically the same as
metadata.insert without a forward to metadata.edit) for external
automation?
If you need an xml.metadata.update service then perhaps you could put in
an enhancement request. In the meantime, you could easily create such a
service for yourself to avoid this issue (eg. by following the same
example as metadata.insert and xml.metadata.insert) and that way continue
with your automation project.
--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/495#comment:1>
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/>
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.
#495: Metadata services cause out of memory issue
----------------------+-----------------------------------------------------
Reporter: rupert | Owner: geonetwork-devel@…
Type: defect | Status: closed
Priority: major | Milestone: v2.6.5
Component: General | Version: v2.6.3
Resolution: invalid | Keywords: xml services, heap memory
----------------------+-----------------------------------------------------
Comment(by simonp):
Alternatively, if you are somehow using the response from the forward to
metadata.edit by metadata.insert and then using that in the call
metadata.update then you should call metadata.update.finish instead, it
does what metadata.update does but it also removes the metadata from the
session and does not forward to metadata.edit (this is what happens when
you do a 'Save and Close' in the editor).
--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/495#comment:2>
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/>
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.
Alternatively, if you are somehow using the response from the forward to metadata.edit by metadata.insert and then using that in the call metadata.update then you should call metadata.update.finish instead, it does what metadata.update does but it also removes the metadata from the session and does not forward to metadata.edit (this is what happens when you do a 'Save and Close' in the editor).
________________________________________
From: GeoNetwork opensource Developer website [trac_osgeo@anonymised.com]
Sent: Thursday, 7 April 2011 2:08 AM
Subject: Re: [GeoNetwork-devel] [GeoNetwork opensource Developer website] #495: Metadata services cause out of memory issue
#495: Metadata services cause out of memory issue
----------------------+-----------------------------------------------------
Reporter: rupert | Owner: geonetwork-devel@…
Type: defect | Status: closed
Priority: major | Milestone: v2.6.5
Component: General | Version: v2.6.3
Resolution: invalid | Keywords: xml services, heap memory
----------------------+-----------------------------------------------------
Changes (by simonp):
* status: new => closed
* resolution: => invalid
Comment:
Actually metadata.insert and metadata.update all forward to metadata.edit
- metadata.edit will store the metadata record in the session and release
it when the user saves the record - this is the intended behaviour as they
are used by the user interface.
Shouldn't you be using xml.metadata.insert (this is basically the same as
metadata.insert without a forward to metadata.edit) for external
automation?
If you need an xml.metadata.update service then perhaps you could put in
an enhancement request. In the meantime, you could easily create such a
service for yourself to avoid this issue (eg. by following the same
example as metadata.insert and xml.metadata.insert) and that way continue
with your automation project.
#495: Metadata services cause out of memory issue
----------------------+-----------------------------------------------------
Reporter: rupert | Owner: geonetwork-devel@…
Type: defect | Status: closed
Priority: major | Milestone: v2.6.5
Component: General | Version: v2.6.3
Resolution: invalid | Keywords: xml services, heap memory
----------------------+-----------------------------------------------------
Comment(by rupert):
Replying to [comment:2 simonp]:
> Alternatively, if you are somehow using the response from the forward to
metadata.edit by metadata.insert and then using that in the call
metadata.update then you should call metadata.update.finish instead, it
does what metadata.update does but it also removes the metadata from the
session and does not forward to metadata.edit (this is what happens when
you do a 'Save and Close' in the editor).
The call to metadata.update.finish is exactly what I needed. This is
undocumented, are there other gems that would be useful to others? Thanks
for the help.
--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/495#comment:3>
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/>
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.