[Archivesspace_Users_Group] Problem with events created by the API

Andrew Morrison andrew.morrison at bodleian.ox.ac.uk
Fri Oct 9 11:01:28 EDT 2020


Hello,

Has anyone else experienced problems with the API generating so many 
events that it causes records to be unviewable?

We need to move ~3000 archival objects from one resource to another, and 
then into their correct places as children of other archival objects 
already in the destination resource. That worked fine while testing, 
doing a few calls to the component_transfers 
<https://archivesspace.github.io/archivesspace/api/#transfer-components-from-one-resource-to-another> 
and accept_children 
<https://archivesspace.github.io/archivesspace/api/#move-existing-archival-objects-to-become-children-of-an-archival-object> 
methods at the time. But when run as a script on a clone of our 
production system, making ~6000 API calls caused both the source and 
destination resources to display gateway errors in the staff interface 
(Java heap space errors in the logs). My first reaction was to do a full 
re-index 
<http://archivesspace.github.io/archivesspace/user/re-creating-indexes/#Full-reindex>. 
But that didn't fix it, in fact it made it worse, because all the moved 
archival objects disappeared from the Solr index (but the indexer didn't 
log any errors), meaning they disappeared from the public user interface 
(no individual pages and not included in the collection organization 
view, although they were listed in the tree structure in the sidebar.)

The problem appears to be that the component_transfers method creates an 
event record each time it successfully transfers an archival object 
between two resources. Each of those event objects are linked to both 
the source and destination resources, as well as to the individual 
archival object moved. Having ~3000 events linked to a single resource 
seems to be too many for the staff interface to display. And somehow 
they must also interrupt indexing.

I was able to fix it by deleting the events via their own API endpoint. 
But that adds an extra step, to read the component_transfers responses 
to get the event IDs, and then send another ~3000 requests to delete 
them. Does anyone know if it is possible to prevent the events being 
created in the first place?

Thanks,

Andrew.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20201009/21ea7416/attachment.html>


More information about the Archivesspace_Users_Group mailing list