OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



OJS 2.4.2 Indexing problem after upgrade

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

OJS 2.4.2 Indexing problem after upgrade

Postby rania » Mon Dec 09, 2013 3:26 am

Hello all! :)

I am experiencing a strange problem after upgrading ojs from version 2.2 to 2.4.2.

First, let me say that in the same server we have many installations of ojs of various versions from 2.2 to 2.4.2 and every installation works smoothly. :D This problem occurs to two installations that were upgraded from ojs version 2.2.
In order to upgrade these two journals, we upgraded only the database (no errors during the process) and used a fresh new installation of ojs 2.4.2, since we wanted to get rid some previous customizations we had in version 2.2.

Now, during indexing, if I activate the pdftotext in order to index the files, the following error occurs when I run phpRebuildSearchIndex.php:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 89 bytes) in /web/hr242.ojs.dev.ekt.gr/lib/pkp/classes/core/Registry.inc.php on line 35
If I run phpRebuildSearchIndex.php without pdftotext, everything works fine.

Since I suspect that there is something wrong with the files in the database or the directory, I have searched the forum and I have tried the following two suggestions but to no avail:
(1) Bug #8264: Upgrade bug with article_files transition and "temp" file type -> All article files were batch imported, there were no temp files in article_files table as I checked from the database backup.
(2) Based on Alec suggestions regarding memory problems (viewtopic.php?f=8&t=10058) , I patched the HookRegistry.inc.php, just in case the problem was generated from that, but again nothing! :(

Any help would be deeply appreciated!

Many thanks!
Rania
Last edited by rania on Tue Dec 10, 2013 10:12 am, edited 2 times in total.
rania
 
Posts: 35
Joined: Thu Nov 08, 2007 1:37 am

Re: OJS 2.4.2 Indexing problem after upgrade

Postby asmecher » Mon Dec 09, 2013 10:30 am

Hi Rania,

The HookRegistry memory leak patch you refer to above has resolved all these sorts of problems as far as I'm aware, so the first thing would be to double-check the application of that patch. Beyond that, this may be tricky to debug remotely as different PHP versions behave very differently on various platforms with respect to memory usage. One of our developers has some experience tracking down memory leaks and I'll ask him to post a few quick guidelines here.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: OJS 2.4.2 Indexing problem after upgrade

Postby bbeghelli » Mon Dec 09, 2013 1:27 pm

Hi Rania,

The way I track down memory leak is using xdebug (a debugging tool) integrated with Eclipse. This tool allows me to execute one line of code at a time, so I just keep an eye in php process memory usage while manually executing all the code. If something rises up, then I stop the execution, run it again, and enter into the executed method that increased the memory usage (run manually each line of code inside that method with xdebug).

That's faster than echoing the php memory usage without knowing where to start, but if you don't work with Eclipse and/or xdebug, you can try repeating this echoing the memory usage before and after each method call.

Hope that helps a little bit.

Regards,
Bruno
bbeghelli
 
Posts: 104
Joined: Tue Jun 25, 2013 2:22 pm

Re: OJS 2.4.2 Indexing problem after upgrade

Postby rania » Tue Dec 10, 2013 10:12 am

Τhank you Alec and Bruno for your quick replies! :D

Alec your suggestion was correct. Although the date modified of HookRegistry.inc.php file was changed when I applied the patch, the code inside hadn't changed.

I re-applied successfully the patch and now the memory leak problem was resolved.
Currently I have successfully rebuilt the search index of one of the two journals.
The second one fails with Duplicate entry error for for key 'article_search_object_keywords_pkey'.

I will recheck the upgrade process of the database of the second journal, just in case somnething went wrong.

Thanks Bruno for the XDebug info!

Many thanks! :)
Rania
rania
 
Posts: 35
Joined: Thu Nov 08, 2007 1:37 am

Re: OJS 2.4.2 Indexing problem after upgrade

Postby asmecher » Tue Dec 10, 2013 10:17 am

Hi Rania,

One quick thing to double-check -- ensure that the encoding of that database table is UTF8, not Latin1; check that UTF8 and mbstring are supported in your PHP install; and check that connection_charset and database_charset are set to utf8 in your config.inc.php file. If some of these are not the case, you may need to transcode your database or risk facing garbled accented characters, but this will be well worth doing -- we'll be relying on a proper UTF8 setup increasingly in the future as the horrors of PHP4 recede into the distant past.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: OJS 2.4.2 Indexing problem after upgrade

Postby rania » Wed Dec 11, 2013 8:53 am

Thanks Alec! :)
Probably it was caused from a temporary mishap from the database.
We rechecked with our system administrators and rerun rebuildSerachIndex and everything worked fine! :)
We are Greeks, everything is set to UTF-8! :lol:
We even have journals that still use polytonic greek... :roll:

Many thanks for the support and all the help!

Regards,
Rania
rania
 
Posts: 35
Joined: Thu Nov 08, 2007 1:37 am


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Yahoo [Bot] and 3 guests