You are viewing the PKP Support Forum | PKP Home Wiki

Upgrade never completes - Mysql CPU usage stays at 90-95%

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
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Upgrade never completes - Mysql CPU usage stays at 90-95%

Postby simon » Tue Sep 27, 2005 12:58 pm


I was trying to upgrade OJS from version 2.0.1 to 2.0.2. I ran the command line tool for upgrade. However the upgrade process never seems to complete. Here is the output:

# php tools/upgrade.php upgrade
Content-type: text/html
X-Powered-By: PHP/4.3.9

[load: upgrade.xml]
[data: upgrade/2.0.2_preupdate.xml]
[schema: ojs_schema.xml]
[data: upgrade/2.0.2_update.xml]
[code: Installer Installer::rebuildSearchIndex]

The updater appears to be hung at this point. I waited for about half an hour and nothings changed. I also tried updating from the web interface and got the same reult (i.e. never completed). In the mean time, while the upgarde was supposed to be taking place the CPU usage of mysql server went to 90-95%% and stayed there. I have hosted only one journal and it does not even have many articles, only about 30-40 articles. Can someone suggest what might be causing this? Thanks.

Re:Upgrade never completes - Mysql CPU usage stays at 90-95%

Postby asmecher » Wed Sep 28, 2005 11:15 am

Hello Simon,

In my experience the indexing process can take quite a while, although half an hour certainly sounds excessive.

To finish your partially-completed upgrade, you'll have to do two things:
  • Update the versions table
  • Complete the indexing

To update the versions table, run this in MySQL (assuming you're now using 2.0.2-1):
Code: Select all
update versions set current=0;
insert into versions(major,minor,revision,build,date_installed,current) values(2,0,2,1,now(),1);

You can complete indexing using the tools/rebuildSearchIndex.php script from the command line; my suggestion is that you turn on MySQL logging and check the log file to see if anything meaningful is going on or if there is, in fact, some sort of loop.

Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Postby simon » Wed Sep 28, 2005 3:01 pm

Hmmm.... Ok, so it looks like the indexing does in fact take very long. I tried it again today. It took about 40 minutes for the indexing, but finally it did complete. I wonder what happens if there are many journals and thousands of articles.

Postby asmecher » Wed Sep 28, 2005 11:53 pm

Hi Simon,

Glad to hear your installation is back up and running. So far the indexing process hasn't been an issue, but I'll look into its performance.

Incidentally, one of the changes we're looking at making for the next major release is pluggable indexing and searching.

Alec Smecher
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Postby asmecher » Thu Sep 29, 2005 12:22 am

Note: Indexing performance issues have been addressed via creation of an index. See related bugzilla entry:


This fix will be released with the next 2.0.x build.

Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 3 guests