OAI-PMH slow and listrecord validation invalid

Hi
I have version 3.1.2, when I check the validation list of oai it takes too long to show, but it shows correctly
this the link
http://ref.uabc.mx/ojs/index.php/ref/oai?verb=ListRecords&metadataPrefix=oai_dc
image
but when I want to validate in oai-pmh validator I get an error because it takes a long time.
In section Identify all is OK
image
but in the section List Record OAI_DC
image

When I check the url in the validation of OAI-PMH, the following page
image
I review Error logs of php… I do not have error messages just warnings

[Wed May 15 10:13:07.484984 2019] [php7:warn] [pid 2422] [client XXX.XXX.XXX.XXX:59248] PHP Warning: Declaration of JournalOAI::sets($offset, $limit, &$total) should be compatible with OAI::sets($offset, &$total) in /var/www/ojs/classes/oai/ojs/JournalOAI.inc.php on line 22

[Wed May 15 10:13:10.900309 2019] [php7:warn] [pid 2485] [client 66.249.65.173:59133] PHP Warning: Cannot use a scalar value as an array in /var/www/ojs/lib/pkp/classes/core/DataObject.inc.php on line 133

[Wed May 15 10:13:10.900496 2019] [php7:warn] [pid 2485] [client 66.249.65.173:59133] PHP Warning: Cannot use a scalar value as an array in /var/www/ojs/lib/pkp/classes/core/DataObject.inc.php on line 133

The server has 16 GB of memory and php is assigned 3 GB in configuration…

Hi @JoannaB,

Per this discussion I think you’ve set your oai_max_records far too high. The default setting is 100. Raising it too high will be very hard on your server.

Regards,
Alec Smecher
Public Knowledge Project Team

In fact, I tried to leave my registry at 50 and the system took 4 minutes to process the information.
and the validation OAI-PMH returned error

I did a test using the database of an OJS version 3.1.2 in an OJS 3.1.1.2 system and the system runs quite fast.

Hi @JoannaB,

I tried the URL above and the result came back with 500 records. Are you sure it’s set to 50?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi
I change the value to 50 but then return it to 500. I leave it from this moment on 50

Hi @JoannaB,

I just took a quick test and the request came in at about 1:30. That’s still quite slow but much quicker than 4 minutes; are you still seeing longer times than that?

Regards,
Alec Smecher
Public Knowledge Project Team

The problem happens when I want to validate the league for OAI-PMH what redib asks me
http://validator.oaipmh.com/#ListRecords

image
in the section ListRecord_OAI_DC

and I know that the validation problem is the time because when reducing to 15 the records… the page does not send the error of invalid if not a legend “Request time too much 5.36”

image

It stays at 15 the record.

Hi @JoannaB,

I don’t know what time limit the validator sets, and the OAI spec doesn’t mandate a response time. In general, the bigger the list of records you deliver, the more server resources it’ll take to assemble.

Your installation seems to be performing worse than normal, which could indicate low resources allocated, or operating system-based quotas, or a database configuration problem, or problem data in your database, or probably a dozen other potential causes. The most likely case, I think, is problem data in your database, or perhaps something like a missing database index. The best way to debug that will be to set up a “slow query” log in your database and review the queries it captures.

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you.
We will make an installation of OJS and upload some articles to test this section.
In terms of resources it is a server dedicated exclusively to OJS.

After the test I updated this post.

Hello friends,

The problem was solved?

I also have the same problem

https://revformacaodocente.com.br/index.php/rbpfp/oai

Hugs

It was not resolved, we left our register oai_max_records with the value of 20

Hi Joanna

I wonder where your server reside? It is honestly very slow when accessing some archive.

I ever have same problem and it seem like because of the hardware (DO), we then decide to move our client to new server using nginx webserver and it is now faster.

And about the OAI, we also encounter the same problem with OJS 3.1.2-4. Maybe there are some little help from PKP team ?

Hi @JoannaB Did you finally make it work? I would appreciate if you can share your feedback. Thank you.

Today I also got a message from REDIB for one of our journals.

IMHO, even validator fails, this is not necessarily a real error.

In my case, error jumps in validator because the full list of articles can take a while (one minute and half for 500 records), but if you check it manually, data is finally generated and all works as expected. The only BUT is the page is slow, but it won’t be a problem with other harvesters that are more patient.

If you like to make the validator (and REDIB) happy, you can reduce the oai_max_records to 100 (or less, but always bigger the usual number of articles that are released with each number) as Alec explained before.

BTW @JoannaB your 5.3 seconds sounds pretty good to me.

(There is a Github issue filed for improvements to the OAI interface performance in OJS 3.3.x; see work in progress: Improve OAI performance · Issue #6963 · pkp/pkp-lib · GitHub)