The page timer used to check how long updates have been running uses the ammount of time from the start of the request, so there is already time on the clock by the time it is checked the first time, currently just before the first update is performed. If it has taken more than a second already, then the updates are completely skipped and the unchanged status is sent back, causing an infinite loop until the code execution becomes faster.

This patch moves the time checking to the end of the loop which guarantees at least one update is performed.

CommentFileSizeAuthor
#3 update.php_4.diff932 bytesdrumm
update.php_3.diff932 bytesdrumm
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hunmonk’s picture

tested, works great. before this patch i was having trouble with my database updates hanging--after applying things worked beautiful. +1

Dries’s picture

Doesn't that break always trigger now? Shouldn't that be greater than?
(How about we remove the timing stuff alltogether and do one update function at a time?)

drumm’s picture

FileSize
932 bytes

Good catch. New patch attached.

On a reasonably fast server, many updates can be done in a second. My 4.6 to 4.7 updates usually got done in two or three batches. This saves a lot of time since a round trip HTTP request takes a lot of time. The whole process becomes faster if we do as many updates as possible in one batch. The time is as low as one second to provide reasonably frequent feedback to show that progress is being made.

Dries’s picture

Status: Needs review » Fixed

Committed. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)