OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Upgrade 2.4.2 --> 2.4.3 hangs on DB Update

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.

Upgrade 2.4.2 --> 2.4.3 hangs on DB Update

Postby heidelberg » Tue Dec 10, 2013 12:04 am

Dear List,

yesterday I tried to upgrade our OJS instance. Everything went fine up to the point
when I did "php tools/upgrade.php upgrade".

I did let it run over night but it still stays at
[code: Installer Installer::migrateTimedViewsUsageStatistics]
but it won't get any further.

Do you have any idea what the problem could be?
We have OJS run on an Ubuntu 10.04.4 LTS, PHP 5.5.3.

Best wishes,
Stefanie
heidelberg
 
Posts: 40
Joined: Mon May 04, 2009 2:17 am

Re: Upgrade 2.4.2 --> 2.4.3 hangs on DB Update

Postby Jirrka » Tue Dec 10, 2013 6:19 am

Hi, I have exactly the same problem, running
Server version: 5.5.34-0ubuntu0.12.04.1 - (Ubuntu)
Apache/2.2.22 (Ubuntu)
libmysql - 5.5.34


Jiri
Jirrka
 
Posts: 7
Joined: Thu Jul 18, 2013 7:02 am
Location: Prague

Re: Upgrade 2.4.2 --> 2.4.3 hangs on DB Update

Postby bbeghelli » Tue Dec 10, 2013 10:27 am

Hi guys,

Can you tell me how many entries both of you have inside the timed view monthly log table?

The upgrade script can be really slow, but one night should be enough in most cases.

You can also try to run the upgrade and manually access you database, checking if the entries inside usage_stats_temporary_records table are getting higher. This table temporary receives the stats for migration, so if the entry number is not changing, than something is really wrong. In that case, do you see any error in server log files? If yes, can you post them here?

Thanks,
Bruno
bbeghelli
 
Posts: 102
Joined: Tue Jun 25, 2013 2:22 pm

Re: Upgrade 2.4.2 --> 2.4.3 hangs on DB Update

Postby Jirrka » Tue Dec 10, 2013 2:24 pm

Hi Bruno,
I really did not expected, that it can take so long time. I will check it soon and I will be more patient :-) I will report, what happened.


Jiri
Jirrka
 
Posts: 7
Joined: Thu Jul 18, 2013 7:02 am
Location: Prague

Re: Upgrade 2.4.2 --> 2.4.3 hangs on DB Update

Postby Acctdog » Tue Dec 10, 2013 8:27 pm

site wrote:Hi, I have exactly the same problem, running
Server version: 5.5.34-0ubuntu0.12.04.1 - (Ubuntu)
Apache/2.2.22 (Ubuntu)
libmysql - 5.5.34


Jiri


Jirrka wrote:Hi Bruno,
I really did not expected, that it can take so long time. I will check it soon and I will be more patient :-) I will report, what happened.


Jiri


Jiri,

Hi there. Can you please be sure to report back what happened? I am experiencing the same problem you quoted above and I am also not very patient. :D Please let me know if this worked for you as I will use your patience as my example! Than you.
Last edited by Acctdog on Thu Dec 26, 2013 4:47 pm, edited 1 time in total.
Acctdog
 
Posts: 1
Joined: Tue Dec 10, 2013 8:22 pm

Re: Upgrade 2.4.2 --> 2.4.3 hangs on DB Update

Postby heidelberg » Wed Dec 11, 2013 12:05 am

Dear Bruno,
Code: Select all
select * from timed_views_log;
493 rows in set (0.01 sec)


And
Code: Select all
select * from usage_stats_temporary_records;

It has 117 records and is not increasing anymore ...

An the Upgrade script still hangs on the same line
[code: Installer Installer::migrateTimedViewsUsageStatistics]

And there are no hints in the log files ...

Best wishes
Stefanie
heidelberg
 
Posts: 40
Joined: Mon May 04, 2009 2:17 am

Re: Upgrade 2.4.2 --> 2.4.3 hangs on DB Update

Postby bbeghelli » Wed Dec 11, 2013 6:08 am

Hi Stefanie,

493 rows is a small number. I've tested this upgrade process with databases with more than 220000 entries on timed view log, and it took me 1 hour in my machine, less than a few minutes in a server machine. So, the problem is definitely something else.

Is it possible for you to send me your database? It will be much easier trying to upgrade here and debug this. Also, are you using mysql?

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

Re: Upgrade 2.4.2 --> 2.4.3 hangs on DB Update

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

Hi Bruno,

so I have usage_stats_temporary_records 5 records and
timed_views_log 14 146 recors

and no more increasing.

in the apache log I had not find any records from the time of update.

Jiri
Jirrka
 
Posts: 7
Joined: Thu Jul 18, 2013 7:02 am
Location: Prague

Re: Upgrade 2.4.2 --> 2.4.3 hangs on DB Update

Postby bbeghelli » Wed Dec 11, 2013 10:21 am

Hi Jiri,

I offer to you the same proposal that I did to Stefanie (she still didn't replied yet): would it be possible to send me your database? That way I can debug this quickly.

Thanks,
Bruno
bbeghelli
 
Posts: 102
Joined: Tue Jun 25, 2013 2:22 pm

Re: Upgrade 2.4.2 --> 2.4.3 hangs on DB Update

Postby bbeghelli » Wed Dec 11, 2013 8:29 pm

Hi all,

Found the problem. The upgrade script was getting into an infinite loop. See this bug entry for more details and for a patch: http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8513

Thanks to Jiri that sent a database so I could debug and fix this.

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

Re: Upgrade 2.4.2 --> 2.4.3 hangs on DB Update

Postby heidelberg » Wed Dec 11, 2013 11:41 pm

Thanks so much!
It works now.

Stefanie
heidelberg
 
Posts: 40
Joined: Mon May 04, 2009 2:17 am

Re: Upgrade 2.4.2 --> 2.4.3 hangs on DB Update

Postby weedee » Tue Dec 17, 2013 10:01 pm

I have same problem here, doing patch from 2.4.2 --> 2.4.3, upgrade database using cli and now i'am stuck in :

[code: Installer Installer::migrateTimedViewsUsageStatistics]

what i'am supposed to do now? :(
weedee
 
Posts: 5
Joined: Tue May 01, 2012 6:46 pm

Re: Upgrade 2.4.2 --> 2.4.3 hangs on DB Update

Postby asmecher » Tue Dec 17, 2013 11:59 pm

Hi weedee,

Did you try the patch posted immediately above?

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

Re: Upgrade 2.4.2 --> 2.4.3 hangs on DB Update

Postby weedee » Wed Dec 18, 2013 12:42 am

Hi Alec,

Thank you for reply, do you mean this patch? :

Code: Select all
commit 1beb59ed4e82b3bb8c17784e6c6279edd4e84948
Author: Bruno Beghelli <bruno.beghelli@gmail.com>
Date:   Thu Dec 12 01:18:45 2013 -0200

    *8513* Fixed migrating timed view stats

diff --git a/classes/install/Upgrade.inc.php b/classes/install/Upgrade.inc.php
index d9a1b91..ec146bc 100644
--- a/classes/install/Upgrade.inc.php
+++ b/classes/install/Upgrade.inc.php
@@ -1100,6 +1100,8 @@ class Upgrade extends Installer {
 
       while(!$result->EOF) {
          $row =& $result->GetRowAssoc(false);
+         $result->MoveNext();
+
          list($countryId, $cityName, $region) = $geoLocationTool->getGeoLocation($row['ip_address']);
          $fileType = null;
          if ($row['galley_id']) {
@@ -1122,7 +1124,6 @@ class Upgrade extends Installer {
 
          $day = date('Ymd', strtotime($row['date']));
          $tempStatsDao->insert($assocType, $assocId, $day, $countryId, $region, $cityName, $fileType, $loadId);
-         $result->MoveNext();
       }
 
       switch (Config::getVar('database', 'driver')) {


how the way i apply those code?, do i must patch into the OJS directory? (using diff?)

Regards,
weedee
 
Posts: 5
Joined: Tue May 01, 2012 6:46 pm

Re: Upgrade 2.4.2 --> 2.4.3 hangs on DB Update

Postby asmecher » Wed Dec 18, 2013 10:02 am

Hi weedee,

See e.g. http://www.cyberciti.biz/faq/appy-patch-file-using-patch-command/.

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

Next

Return to OJS Technical Support

Who is online

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