OAI-PMH slow and listrecord validation invalid

#1

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


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

but in the section List Record OAI_DC

When I check the url in the validation of OAI-PMH, the following page


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…

#2

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

#3

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.

#4

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

#5

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

#6

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

#7

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


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”

It stays at 15 the record.

#8

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

#9

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.