0

I was pushing our latest version of the site from our development environment to our live site (located on the same server). But unfortunately our web server ran into memory issues which prevented the move. We opened up access to more space but now SQL-sync refuse to function.

I assumed that we had issues with the database being corrupt so I replaced the database with our backup. But this did not help.

The development environment seem to work really well but I am very poor with Drush/SQL so I got a hard time understanding the error messages I get when testing the alias and site config. The Dev site work well while the live site is down and I would appreciate any advice on likely sources of the error.

The Dev alias that work well

sigvard@server1:~$ drush @mysite.dev status
 Drupal version                :  7.26
 Site URI                      :  dev.mysite.org
 Database driver               :  mysql
 Database hostname             :  localhost
 Database username             :  mysite_dev
 Database name                 :  website_mysite_dev
 Database                      :  Connected
 Drupal bootstrap              :  Successful
 Drupal user                   :  Anonymous
 Default theme                 :  mysite
 Administration theme          :  seven
 PHP configuration             :  /etc/php5/cli/php.ini
 Drush version                 :  4.5
 Drush configuration           :
 Drush alias files             :  /usr/share/drush/includes/../aliases/mysite.
                                  aliases.drushrc.php
                                  /home/sigvard/.drush/aliases.drushrc.php
 Drupal root                   :  /var/www/mysite_dev
 Site path                     :  sites/default
 File directory path           :  sites/default/files
 Private file directory path   :

Alias of the live site

sigvard@server1:~$ drush @mysite.live status
include_once(/var/www/mysite/sites/default/settings.php): failed to [warning]
open stream: Permission denied in drupal_settings_initialize() (line
717 of /var/www/mysite/includes/bootstrap.inc).
include_once(): Failed opening                                       [warning]
'/var/www/mysite/sites/default/settings.php' for inclusion
(include_path='.:/usr/share/php:/usr/share/pear') in
drupal_settings_initialize() (line 717 of
/var/www/mysite/includes/bootstrap.inc).
 Drupal version         :  7.26
 Site URI               :  mysite.org
 Default theme          :  garland
 Administration theme   :  garland
 PHP configuration      :  /etc/php5/cli/php.ini
 Drush version          :  4.5
 Drush configuration    :
 Drush alias files      :  /usr/share/drush/includes/../aliases/mysite.aliases
                           .drushrc.php /home/sigvard/.drush/aliases.drushrc.php
 Drupal root            :  /var/www/mysite
 Site path              :  sites/default
 File directory path    :  sites/default/files

sql-conf of the dev site

sigvard@server1:~$ drush @mysite.dev sql-conf
Array
(
    [database] => website_mysite_dev
    [username] => mysite_dev
    [host] => localhost
    [port] =>
    [driver] => mysql
    [prefix] =>
)

sql-conf attempt on the live site

sigvard@server1:~$ drush @mysite.live sql-conf
include_once(/var/www/mysite/sites/default/settings.php): failed to [warning]
open stream: Permission denied in drupal_settings_initialize() (line
717 of /var/www/mysite/includes/bootstrap.inc).
include_once(): Failed opening                                       [warning]
'/var/www/mysite/sites/default/settings.php' for inclusion
(include_path='.:/usr/share/php:/usr/share/pear') in
drupal_settings_initialize() (line 717 of
/var/www/mysite/includes/bootstrap.inc).
1

I wonder if it's a file system permission on your live site. Are you sure /var/www/mysite/sites/default/settings.php on the live site is readable by your web server?

(Also, unrelated to this but Drush 4.5 is getting pretty old so if possible you might want to update it.)

  • Yeah, Drush probably needs to be updated as well, looks like it doesn't get updated together with other modules. But settings.php should be readable. – Sigvard Feb 13 '14 at 6:56
  • I was hoping that updating Drush would solve the issue but: Install location /usr/share/drush already exists. Do you want to overwrite it? (y/n): y Project drush (7.x-1.x-dev) downloaded to /usr/share/drush. [success] Drush successfully updated to version 7.x-1.x-dev. Project drush contains 8 modules: drush_pm, drush_pm_svn, drush_pm_wget, drush_sql, drush_pm_cvs, drush_simpletest, drush_tools, drush. mylogin$ drush site-alias E: Could not locate a Drupal installation directory. Aborting. @Mark G – Sigvard Feb 13 '14 at 7:23
0

The initial error was caused by a server error filling the allocated memory and crashing the sync.

The corrupt server was a nightmare so in the end I just wiped the database and recreated the site from a backup using Drush.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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