Installing and upgrading help

Plugin installation woes - Moodle 3.3.1

 
Picture of Jacques LeCavalier
Plugin installation woes - Moodle 3.3.1
 

Hi, there. We're using Moodle 3.3.1.

We’ve been wanting to try out a few external plugins lately, and I have been following the process of first installing the plugin in our Test instance in order to ensure things will go smoothly with the production version. I have been assured by our IT guys that the Test configuration is the same as Production, so the behavior should be the same.

However, the last two times I’ve installed plugins – using the “automatic” plugin directory approach - (I believe the first one was Multilingual Content, and yesterday it was Completion Progress), the installation in the Test instance went smoothly, but the installation in the Production instance did not. Instead of progressing through the database update step quickly, the process got stuck there for some time, displaying an error message (Please wait, database is being upgraded), for perhaps 30 minutes, and/or leaving me stuck at the “Plugin check” page, with no way to move forward.

In both cases, the database eventually stabilized and the platform became available again, but leaving me with the feeling that there is something not right with the database.

I suspect that these immediate situations can be fixed by manually removing the plugin folder that is causing a problem, but this doesn’t help to prevent this in the future.

Anyone have any idea what the causes might be? Is there a straightforward procedure for debugging the problem?

thanks for any help!

Jacques

 
Average of ratings: -
Picture of Emma Richardson
Re: Plugin installation woes - Moodle 3.3.1
Documentation writersParticularly helpful Moodlers

I would bring your IT department in.  So many things could be the cause and so little information...what OS are you running on?  Is the database on the same server?  Are there firewalls in the way?  Is the dev moodle on the same server as the live server? etc. etc...

 
Average of ratings: -
Picture of Jacques LeCavalier
Re: Plugin installation woes - Moodle 3.3.1
 

Hi, there.

We're still struggling with this plugin installation issue. To try to address Emma's question, we have a Test and a Production instance of Moodle 3.3.1 on the same server, and they are identical. On the Test instance, we are able to install plugins smoothly. On the Prod instance, we are not. With most plugins we try, the site goes down after the "Update database" button is clicked, for perhaps just one minute, sometimes longer.

We tried emptying the Moodle caches. This did not change anything.

With some plugins, the error that comes up after the site comes back up is that the plugin already existed in the database, which it didn't.

I realize I may not be providing all the details necessary, but if anyone has experienced similar system behaviour when installing plugins, I'd appreciate hearing about any possible causes and solutions.

Thanks!
Jacques

 
Average of ratings: -
Picture of Howard Miller
Re: Plugin installation woes - Moodle 3.3.1
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

If you are having trouble with the web based installer/upgrader then try again with the command line based one. 

On larger sites I have not had satisfactory experiences with the web installer for years. You tend to run out of some resource or other before the upgrade completes. 

The command line upgrade script is much more reliable (but still can be very slow on large/busy sites as it has to completely invalidate the caches)

 
Average of ratings: -
Picture of Jacques LeCavalier
Re: Plugin installation woes - Moodle 3.3.1
 

Thanks for the reply, Howard.

I can't find any information on the CLI installer, but is this equivalent to installing a plugin via FTP?

So you're suggesting that running out of a resource during installation is causing the site to go down? Can you spell that out a bit more, please?

Appreciate the help.
JL

 
Average of ratings: -
Picture of Howard Miller
Re: Plugin installation woes - Moodle 3.3.1
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

See - https://docs.moodle.org/33/en/Administration_via_command_line#Upgrading

You can (if you must) use the built in installer - just don't run the final upgrade step, use the command line installer. Of course, this depends on you having shell access on your site which you may not. 

As I do have shell access, I've never bothered to work out why web based upgrading can be problematic. My guess is that clearing the cache maybe taking ages. I would try (before you do anything) making sure the site is in maintenance mode and then purging the caches.

 
Average of ratings: -
Picture of AL Rachels
Re: Plugin installation woes - Moodle 3.3.1
Core developersParticularly helpful MoodlersPlugin developersTesters

The only time I can remember having problems with the web based upgrade was when I had folder permissions set wrong and PHP max execution time left on the default, which I think is 30 seconds. If your server is "fast" and your Moodle is the only thing on it, that is usually ok, but on shared servers, or ones with slow processor speed, it might not be enough, especially when creating all the Moodle database tables and fields. This is really notable when the database is not on the same computer as the web server or using NAS.

 
Average of ratings: -
Picture of Jacques LeCavalier
Re: Plugin installation woes - Moodle 3.3.1
 

Thanks, Howard and Al. 

I don't have shell access - these kinds of manipulations are beyond me anyways.

I'll see if I can find an external Moodle service provider to help out. Perhaps it is simply a timeout problem, or some sort of unwanted interaction between the Test and Prod instances.

Best,
Jacques

 
Average of ratings: -
Picture of AL Rachels
Re: Plugin installation woes - Moodle 3.3.1
Core developersParticularly helpful MoodlersPlugin developersTesters

I seem to remember having a similar problem a long time ago when I cloned one Moodle from another, and if my poor memory is correct it was due to the two Moodles having the same Cookie prefix and Cookie path. Check those two settings at Site administration > Server > Session handling. It might have also been registration of the two with the same info. Just can't remember for sure, now.

 
Average of ratings: -
Picture of Jacques LeCavalier
Re: Plugin installation woes - Moodle 3.3.1
 

Thanks for the message, Al. I'll check that out.
JL

 
Average of ratings: -