[Archivesspace_Users_Group] Problem with events created by the API

2020-10-09 Thread Andrew Morrison

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 
 
and accept_children 
 
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 
. 
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.


___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group


Re: [Archivesspace_Users_Group] MySQL connector question

2020-10-09 Thread Blake Carver
Try using the older connector,
https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.49.tar.gz

From: archivesspace_users_group-boun...@lyralists.lyrasis.org 
 on behalf of Peter 
Heiner 
Sent: Friday, October 9, 2020 8:13 AM
To: Archivesspace Users Group 
Subject: Re: [Archivesspace_Users_Group] MySQL connector question

Neal, Rick wrote on 2020-10-09 11:47:06:
> I checked my CLASSPATH but found it was empty.  My java is using
> /bin/java.  Could my issues simply be that the CLASSPATH is empty?  Do
> I want to add java to the CLASSPATH by doing this: export
> CLASSPATH=/bin/java and then test to see if everything just starts
> working?

I realise capitalising 'classpath' was a mistake. Some Java apps'
startup scripts make use of this, others use the java binary's -cp or
-classpath flag directly. ArchivesSpace's classpath does not include
system directories like /usr/share/java where the mysql-connector-java
package puts its files. You need to copy or link the connector found in
/usr/share/java/mysql-connector-java-8.0.12.jar to the main
archivesspace/lib directory.

p

___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group


Re: [Archivesspace_Users_Group] MySQL connector question

2020-10-09 Thread Peter Heiner
Neal, Rick wrote on 2020-10-09 11:47:06:
> I checked my CLASSPATH but found it was empty.  My java is using
> /bin/java.  Could my issues simply be that the CLASSPATH is empty?  Do
> I want to add java to the CLASSPATH by doing this: export
> CLASSPATH=/bin/java and then test to see if everything just starts
> working?

I realise capitalising 'classpath' was a mistake. Some Java apps'
startup scripts make use of this, others use the java binary's -cp or
-classpath flag directly. ArchivesSpace's classpath does not include
system directories like /usr/share/java where the mysql-connector-java
package puts its files. You need to copy or link the connector found in
/usr/share/java/mysql-connector-java-8.0.12.jar to the main
archivesspace/lib directory.

p

___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group


Re: [Archivesspace_Users_Group] MySQL connector question

2020-10-09 Thread Neal, Rick
Good morning Peter,

Thank you for your help!

I checked my CLASSPATH but found it was empty.  My java is using /bin/java.  
Could my issues simply be that the CLASSPATH is empty?  Do I want to add java 
to the CLASSPATH by doing this: export CLASSPATH=/bin/java and then test to see 
if everything just starts working?

[root@aspace lib]# echo $ {CLASSPATH}
$ {CLASSPATH}
[root@aspace lib]# which java
/bin/java

Rick

-Original Message-
From: archivesspace_users_group-boun...@lyralists.lyrasis.org 
 On Behalf Of Peter 
Heiner
Sent: Friday, October 9, 2020 7:32 AM
To: Archivesspace Users Group 
Subject: Re: [Archivesspace_Users_Group] MySQL connector question

Neal, Rick wrote on 2020-10-09 11:18:00:
> I am continuing to troubleshoot our mysql issue and have a question about the 
> mysql connector.
> 
> My operating system is RHEL 7.
> MySQL version is:  mysql-community 5.6.49-2.el7
> 
> The instructions sent me to:  
> https://dev.mysql.com/downloads/connector/j/
> 
> I downloaded:  mysql-connector-java-8.0.21-1.el7.noarch.rpm
> 
> I did a little searching and found that the mysql-community repo has this one 
> available:  mysql-connector-odbc.x86_64 8.0.21-1.el7
> 
> My question is that since I installed mysql from a mysql-community repo 
> should I use the mysql-connector-odbc file from that same repo?  Does it 
> matter which one?

You need mysql-connector-java, I believe the one you downloaded should be fine. 
It should be sufficient t have it somewhere in your CLASSPATH.

p

___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group


Re: [Archivesspace_Users_Group] MySQL connector question

2020-10-09 Thread Peter Heiner
Neal, Rick wrote on 2020-10-09 11:18:00:
> I am continuing to troubleshoot our mysql issue and have a question about the 
> mysql connector.
> 
> My operating system is RHEL 7.
> MySQL version is:  mysql-community 5.6.49-2.el7
> 
> The instructions sent me to:  https://dev.mysql.com/downloads/connector/j/
> 
> I downloaded:  mysql-connector-java-8.0.21-1.el7.noarch.rpm
> 
> I did a little searching and found that the mysql-community repo has this one 
> available:  mysql-connector-odbc.x86_64 8.0.21-1.el7
> 
> My question is that since I installed mysql from a mysql-community repo 
> should I use the mysql-connector-odbc file from that same repo?  Does it 
> matter which one?

You need mysql-connector-java, I believe the one you downloaded should
be fine. It should be sufficient t have it somewhere in your CLASSPATH.

p

___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group


Re: [Archivesspace_Users_Group] MySQL issue

2020-10-09 Thread Peter Heiner
Neal, Rick wrote on 2020-10-08 12:55:39:
> I then SHOW GRANTS;
> 
> It only lists the grants for the root user.  Nothing about the archivesspace 
> database or user.

Plain SHOW GRANTS operates on the current user, root in your case. You
need to use SHOW GRANTS FOR 'username'@'host';

p

___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group


[Archivesspace_Users_Group] MySQL connector question

2020-10-09 Thread Neal, Rick
Good morning,

I am continuing to troubleshoot our mysql issue and have a question about the 
mysql connector.

My operating system is RHEL 7.
MySQL version is:  mysql-community 5.6.49-2.el7

The instructions sent me to:  https://dev.mysql.com/downloads/connector/j/

I downloaded:  mysql-connector-java-8.0.21-1.el7.noarch.rpm

I did a little searching and found that the mysql-community repo has this one 
available:  mysql-connector-odbc.x86_64 8.0.21-1.el7

My question is that since I installed mysql from a mysql-community repo should 
I use the mysql-connector-odbc file from that same repo?  Does it matter which 
one?

Thanks

Rick

___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
___
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group