OAI-PMH error: "Parent Resource id ... does not exist"

43 views
Skip to first unread message

paclo...@gmail.com

unread,
Dec 9, 2022, 10:47:49 AM12/9/22
to AtoM Users
Hi all -

We have been successfully using OAI-PMH to harvest records from our AtoM (v2.4) instance for a few years. Yesterday, after making an OAI-PMH request programatically I received an error. Checking further, the same request also fails in my web browser. When I check the nginx server logs I see the following error:

2022/12/09 00:49:05 [error] 7633#7633: *5256 FastCGI sent in stderr: "PHP message: Parent Resource id '184973' does not exist" while reading response header from upstream, client: [IP address], server: atom.library.miami.edu, request: "GET /;oai?verb=ListRecords&metadataPrefix=oai_dc&set=oai:virtual:top-level-records HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "atom.library.miami.edu"

If I remove the "set=oai:virtual:top-level-records" parameter the server responds, but with many thousands more records than I am interested in.

Has anyone seen an error like this or have any guesses as to what might be happening?

Thank you,
Paul

Dan Gillean

unread,
Dec 9, 2022, 2:39:11 PM12/9/22
to ica-ato...@googlegroups.com
Hi Paul, 

A 'parent resource id 'XXXXX' does not exist" error is usually due to one of the following data problems:
  1. The nested set values for the row are not correct.  Sometimes this is because the parent_id of the row is NULL, or an invalid id. You can address this issue by using the CLI command to rebuild the nested set and then trying again. 
  2. There is no slug row related to the information object. This is more of a rare case that typically happens when a process times out during record creation - for example, a very large import, update, move, etc. You can try addressing missing slugs by running the slug generation CLI task.
  3. There is no publication status row related to the information object. Like 2 above, this is also a rarer edge case typically caused by a long-running process timing out. The best way to address this is to use SQL in the MySQL command prompt. See the following section on data corruption, which includes mention of missing publication statuses. 
I would suggest that you start by running the tasks I suggest for 1 and 2 above, and then also clear all caches before re-testing. (Note: In most links I've provided I have linked to the latest version of the docs, because the commands will be the same in 2.4. However, restarting PHP-FPM will be different, and we didn't have it documented in the 2.4 docs, so I've given explicit examples below depending on PHP and Ubuntu version.)

If that doesn't resolve the issue then you could try investigating the 3rd possibility by running the command in the Troubleshooting docs to check for common data corruption, and if it's found, using the provided SQL to insert a publication status. Be sure to back up your data before attempting SQL inserts on production data, and afterwards, restart MySQL, clear the application cache and PHP-FPM, and then test again. 

Let us know how it goes! 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/0080ad04-9edf-44cb-a218-89f36622c8cen%40googlegroups.com.

paclo...@gmail.com

unread,
Dec 14, 2022, 8:03:38 AM12/14/22
to ica-ato...@googlegroups.com

Hi Dan –

 

Thank you for your prompt and comprehensive response! I was able to get the record in question working again (and OAI-PMH in turn) by rebuilding the nested set.

 

Regards,

Paul

 

On 12/9/22, 2:39 PM, "ica-ato...@googlegroups.com" <ica-ato...@googlegroups.com> wrote:

Hi Paul,

 

A 'parent resource id 'XXXXX' does not exist" error is usually due to one of the following data problems:

 

1. The nested set values for the row are not correct. Sometimes this is because the parent_id of the row is NULL, or an invalid id. You can address this issue by using the CLI command to rebuild the nested set <https://www.accesstomemory.org/docs/latest/admin-manual/maintenance/troubleshooting/#rebuilding-the-nested-set> and then trying again.

2. There is no slug row related to the information object. This is more of a rare case that typically happens when a process times out during record creation - for example, a very large import, update, move, etc. You can try addressing missing slugs by running the slug generation CLI task <https://www.accesstomemory.org/docs/latest/admin-manual/maintenance/troubleshooting/#generating-slugs>.

3. There is no publication status row related to the information object. Like 2 above, this is also a rarer edge case typically caused by a long-running process timing out. The best way to address this is to use SQL in the MySQL command prompt. See the following section on data corruption <https://www.accesstomemory.org/docs/latest/admin-manual/maintenance/troubleshooting/#data-corruption-in-information-objects>, which includes mention of missing publication statuses.

 

I would suggest that you start by running the tasks I suggest for 1 and 2 above, and then also clear all caches before re-testing. (Note: In most links I've provided I have linked to the latest version of the docs, because the commands will be the same in 2.4. However, restarting PHP-FPM will be different, and we didn't have it documented in the 2.4 docs, so I've given explicit examples below depending on PHP and Ubuntu version.)

 

* Clearing the application cache:

* php symfony cc

* Restarting PHP-FPM: This will depend on which version of Ubuntu you're using for your 2.4 installation.

* If you're using Ubuntu 14.04 with PHP 5.x: sudo service php5-fpm restart

* If you're using Ubuntu 16.04 with PHP 7.0: sudo systemctl restart php7.0-fpm

 

 

 

 

If that doesn't resolve the issue then you could try investigating the 3rd possibility by running the command in the Troubleshooting docs to check for common data corruption, and if it's found, using the provided SQL to insert a publication status. Be sure to back up your data <https://www.accesstomemory.org/docs/latest/admin-manual/maintenance/common-atom-queries/#cli-backup-db> before attempting SQL inserts on production data, and afterwards, restart MySQL, clear the application cache and PHP-FPM, and then test again.

 

 

Let us know how it goes!

 

 

Dan Gillean, MAS, MLIS

AtoM Program Manager

 

 

he / him

 

 

 

 

 

 

 

 

 

On Fri, Dec 9, 2022 at 10:47 AM paclo...@gmail.com <mailto:paclo...@gmail.com> <paclo...@gmail.com <mailto:paclo...@gmail.com>> wrote:

 

Hi all -

 

We have been successfully using OAI-PMH to harvest records from our AtoM (v2.4) instance for a few years. Yesterday, after making an OAI-PMH request programatically I received an error. Checking further, the same request also fails in my web browser. When I check the nginx server logs I see the following error:

 

 

2022/12/09 00:49:05 [error] 7633#7633: *5256 FastCGI sent in stderr: "PHP message: Parent Resource id '184973' does not exist" while reading response header from upstream, client: [IP address], server: atom.library.miami.edu <http://atom.library.miami.edu>, request: "GET /;oai?verb=ListRecords&metadataPrefix=oai_dc&set=oai:virtual:top-level-records HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000 <http://127.0.0.1:9000>", host: "atom.library.miami.edu <http://atom.library.miami.edu>"

 

 

If I remove the "set=oai:virtual:top-level-records" parameter the server responds, but with many thousands more records than I am interested in.

 

 

Has anyone seen an error like this or have any guesses as to what might be happening?

 

 

Thank you,

Paul

 

--

You received this message because you are subscribed to the Google Groups "AtoM Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com <mailto:ica-atom-users&#43;unsub...@googlegroups.com>.

 

 

--

You received this message because you are subscribed to a topic in the Google Groups "AtoM Users" group.

To unsubscribe from this group and all its topics, send an email to ica-atom-user...@googlegroups.com <mailto:ica-atom-users&#43;unsub...@googlegroups.com>.

 

Reply all
Reply to author
Forward
0 new messages