site stuck while upgrading from 2.2 to 2.3

site stuck while upgrading from 2.2 to 2.3

Fabio Cacciatori -
回帖数:12
the installation blocked while upgrading, after that I always get the message "site under maintenance" and can't finish the upgrade! I am blocked! Please help!!
回复Fabio Cacciatori

Re: site stuck while upgrading from 2.2 to 2.3

Fabio Cacciatori -

I have read that I could use the script

   $ sudo -u apache /usr/bin/php admin/cli/maintenance.php --disable

but I don't have shell access! 

回复Fabio Cacciatori

Re: site stuck while upgrading from 2.2 to 2.3

Luis de Vasconcelos -
Particularly helpful Moodlers的头像

What do you mean by "installation blocked while upgrading"?

回复Luis de Vasconcelos

Re: site stuck while upgrading from 2.2 to 2.3

Fabio Cacciatori -
after the check ok the modules that has to be upgraded, it was upgrading the db, then it blocked. I had encountered this problem of blocking other times but after a while the installation could continue from where it was stuck. this time instead I can't get off "site in maintenance screen"
回复Fabio Cacciatori

Re: site stuck while upgrading from 2.2 to 2.3

Luis de Vasconcelos -
Particularly helpful Moodlers的头像

What do you mean by "blocked"? Do you mean "crashed"? In other words, did the installation crash?

Do you get any error messages? If not, turn on Debugging and see if that gives you any error messages.

回复Luis de Vasconcelos

Re: site stuck while upgrading from 2.2 to 2.3

Fabio Cacciatori -
yes the installation crashed, the error message was "mysql server has gone away" or something like this. the problem is that i can't turn on debugging or access anything because when I try to access the site I get site maintenance screen
回复Fabio Cacciatori

Re: site stuck while upgrading from 2.2 to 2.3

Ken Task -
Particularly helpful Moodlers的头像

Site Maintenance Mode:
http://docs.moodle.org/23/en/Administration_via_command_line#Maintenance_mode

In the config-dist.php file of your install there are lines for manually turning on debugging.

// Force a debugging mode regardless the settings in the site administration
// @error_reporting(1023);  // NOT FOR PRODUCTION SERVERS!
// @ini_set('display_errors', '1'); // NOT FOR PRODUCTION SERVERS!
// $CFG->debug = 38911;  // DEBUG_DEVELOPER // NOT FOR PRODUCTION SERVERS!
// $CFG->debugdisplay = true;   // NOT FOR PRODUCTION SERVERS!

For the full story on 'server gone away', see:
https://dev.mysql.com/doc/refman/5.0/en/gone-away.html

Suggest, if you can, increasing max_allowed_packet
https://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html
May as well do that in my.cnf as future versions of Moodle beyond 2.3 will probably have the same requirements.


If on a shared host your hosting provider may have you capped and they don't support 2.3.  One way to find out ... ask them! ;)

'spirit of sharing', Ken

回复Fabio Cacciatori

Re: site stuck while upgrading from 2.2 to 2.3

Howard Miller -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像
Hi, "something like that" isn't really good enough. We need to know the 'exact' error message (copy and paste it) and exactly when it happened in order to help. It's just guess work otherwise.
回复Howard Miller

Re: site stuck while upgrading from 2.2 to 2.3

Fabio Cacciatori -
You are right, but I can't do the copy and paste of the error because of this maintenance screen that always appears now, I sow the error only once and then the site was stuck in maintenance mode, I think that if I could exit from maintenance mode in some way the installation could continue..
回复Fabio Cacciatori

Re: site stuck while upgrading from 2.2 to 2.3

Ken Task -
Particularly helpful Moodlers的头像

The maintenance mode should not prevent an admin level user from site administration menu where the notifications button is located. 

Are you logging on with an admin level account?  Do you have an alternate admin account?  If so, try that one as well.

'spirit of sharing', Ken

回复Ken Task

Re: site stuck while upgrading from 2.2 to 2.3

Fabio Cacciatori -

no login page is accessible, only maintenance mode screen in all the pages

回复Fabio Cacciatori

Re: site stuck while upgrading from 2.2 to 2.3

Ken Task -
Particularly helpful Moodlers的头像

Try direct route in browser URL line:

http(s)://yoursite/login/index.php

So including debug parameters in config.php file shows nothing?

One can override Maintenance Mode using the following in config.php

$CFG-> maintenance_enabled = '0';

Uhhh, hope you have a complete/full backup of the site previous to attempt at upgrading.

'spirit of sharing', Ken

回复Ken Task

Re: site stuck while upgrading from 2.2 to 2.3

Fabio Cacciatori -

Fortunatly after 36 hours the site left maintenance mode! Installation contined from where it was stuck and everything seeems all rigth now.

I thank you all for the help!!