0

enter image description here

This is what I get when trying to install any update from /admin/reports/updates/update

It stays stuck like that and progress bar doesn't move. I even set permissions in sites/all and sub dirs to 777.

E.g. the update.php works. I upgraded from 7.34 to 7.41 and ran update.php no problem, but cannot update a single module.

EDIT: Actually it crashed after 20 minutes. This is the error:

An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: http:///corporate/authorize.php?batch=1&id=41&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: DELETE FROM {queue} WHERE (item_id = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 202 ) in SystemQueue->deleteItem() (line 273 of /modules/system/system.queue.inc).Uncaught exception thrown in shutdown function.PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: UPDATE {batch} SET batch=:db_update_placeholder_0 WHERE (bid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => a:12:{s:4:"sets";a:1:{i:0;a:15:{s:7:"sandbox";a:0:{}s:7:"results";a:2:{s:3:"log";a:1:{s:13:"jquery_update";a:3:{i:0;a:2:{s:7:"message";s:27:"Error installing / updating";s:7:"success";b:0;}i:1;a:2:{s:7:"message";s:114:"File Transfer failed, reason: /jquery.ui.datepicker-nl.js is outside of the /domains//public_html/corporate";s:7:"success";b:0;}s:6:"#abort";b:1;}}s:5:"tasks";a:0:{}}s:7:"success";b:0;s:5:"start";d:1451383853.52180004119873046875;s:7:"elapsed";i:0;s:5:"title";s:18:"Installing updates";s:12:"init_message";s:40:"Preparing to update your site<br/> ";s:8:"finished";s:38:"update_authorize_update_batch_finished";s:4:"file";s:35:"modules/update/update.authorize.inc";s:16:"progress_message";s:29:"Completed @current of @total.";s:13:"error_message";s:22:"An error has occurred.";s:3:"css";a:0:{}s:5:"total";i:1;s:5:"count";i:1;s:5:"queue";a:2:{s:4:"name";s:17:"drupal_batch:41:0";s:5:"class";s:10:"BatchQueue";}}}s:16:"has_form_submits";b:0;s:11:"current_set";i:0;s:11:"progressive";b:1;s:3:"url";s:46:"http:///corporate/authorize.php?batch=1";s:11:"url_options";a:0:{}s:10:"source_url";s:0:"";s:8:"redirect";s:38:"http:///corporate/authorize.php";s:5:"theme";s:5:"seven";s:17:"redirect_callback";s:11:"drupal_goto";s:2:"id";s:2:"41";s:13:"error_message";s:120:"Please continue to <a href="http:///corporate/authorize.php?batch=1&id=41&op=finished">the error page</a>";} [:db_condition_placeholder_0] => 41 ) in _batch_shutdown() (line 537 of /includes/batch.inc).

EDIT2: If you click go to error page:

Notice: Undefined index: log in update_authorize_update_batch_finished() (line 187 of /modules/update/update.authorize.inc).
Warning: Invalid argument supplied for foreach() in update_authorize_update_batch_finished() (line 187 of /modules/update/update.authorize.inc).
Notice: Undefined index: log in update_authorize_update_batch_finished() (line 236 of /modules/update/update.authorize.inc).
Update failed! See the log below for more information.
7
  • Those sub-folders should not have those permissions and that is most likely not the problem. Help me out here, does it download updates and not apply them or doesn't it download at all? Are the write permissions on the tmp folder correct? Dec 29, 2015 at 10:21
  • How do I know if it downloads? Dec 29, 2015 at 10:24
  • It has a been a while I updated via the gui, I use Drush instead. But I thought the progress bar filled twice, but I might be wrong. The error hints there might also be a problem with the queue table. Perhaps an erroring function. Make a database backup and clear the queue table, then try updating again. Dec 29, 2015 at 10:27
  • So, I double checked the tmp dir. Which is outside public_html dir and the site is inside a sub-dir. So I don't know if I'm doing it right, but tmp dir was set to /tmp and I replaced it with ../../tmp and updated it's .htaccess file and now updates work. So I don't know what's going on. Dec 29, 2015 at 10:33
  • 1
    Possible duplicate of Database general error: 2006 MySQL server has gone away
    – kenorb
    Jun 7, 2016 at 15:01

1 Answer 1

1

To answer the question, there are generally two things that go wrong during updates. Either the update cannot be downloaded, or there is some other process clogging the batch operation.

If the update fails to download, check the Administer > Site configuration > File system page and make sure the temporary directory listed there exists and is writable by your fileserver. For linux generally /tmp (temporary files directory in the OS root) is generally good, for Windows it is often better to create a folder somewhere (C:\Windows\temp often does not work).

If the queue is clogged, there might be a function throwing errors preventing the other processes from continuing. This way the queue and batch tables can fill up rapidly without ever doing something. Make a database backup, truncate the batch and queue tables and see if it makes a difference.

The second error you are seeing is because the process did not complete, and is not the cause but the result of the error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.