Gateway Timeout Error when upgrading

Gateway Timeout Error when upgrading

by Michael Dahlberg -
Number of replies: 6

I'm upgrading our production instance from 3.4.3 to 3.4.6 using the LAE version (The upgrade on our test instance, a clone of production, went mostly ok).  Typically, the upgrade involves unzipping the moodle tar-ball and setting the /var/www/html symlink to this new directory.  Also, I copy the config.php to the new 3.4.6 directory as well as some additional plugins that we've installed over the years.

Once this is complete, I use my web browser to navigate to the system, which identifies that the code files have been upgraded and the database as well as some additional plugins need to be upgraded.  When I try navigating to the moodle URL this time, the browser tries to connect and ultimately I get a Gateway Timeout Error.

I'm running moodle on RHEL7, using apache 2.4, php-fpm 7.0 and mariadb.

Any suggestions on what may be the cause and or some other upgrade method that will be a bit more informative?

Thanks,

Mike

Average of ratings: -
In reply to Michael Dahlberg

Re: Gateway Timeout Error when upgrading

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I might be being stupid... but what does LAE mean?

Have you tried using the command line upgrade? 

Is there anything relevant in the web server's error log?

Average of ratings: Useful (1)
In reply to Howard Miller

Re: Gateway Timeout Error when upgrading

by Michael Dahlberg -

No, not stupid, I should have clarified that.  LAE stands for "Liberal Arts Edition" that is put out by the CLAMP consortium (clamp-it.org).  Other than additional plugins, I'm not sure how it differs from the standard moodle.

I have not tried the CLI upgrade.  I did not even know this was an option.  I'll search the moodle documentation for this.

No errors were found in the web logs, but I didn't expect them to show up.  From what I've seen this is a PHP error so I would expect it to show up in the PHP-FPM logs which, since this is production, don't log a whole lot.


Thanks,

Mike

In reply to Michael Dahlberg

Re: Gateway Timeout Error when upgrading

by Ken Task -
Picture of Particularly helpful Moodlers

A 504 error involves networking/server config ... it's not really a moodle error.

In your setup there could be php 'error_log' files in directories where the error occured.

Since you are on linux ... cd to the code directory then type:

find ./* -name error_log

If there is one, it will kick out showing path to the error_log file.

Since it's 504 and involves networking not sure php would have been reached to be able to report an error.

Please see Google search for clues:

https://www.google.com/search?client=firefox-b-1&q=504+Gateway+error

Moodle's cache ... a bunch.  So cd /path/to/code/directory/admin/cli/

and purge the cache ... php purge_caches.php [ENTER]

That directory, BTW, is where one will find scripts to many things that basically take the web service and therefore whatever browser you are using + network connection out of the loop.   It's just the code talking to the DB server then.

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Gateway Timeout Error when upgrading

by Michael Dahlberg -

Ken:

Thank you very much.  There was a lot of good information in your post.

I ran through the CLI upgrade procedure and that completed successfully, although it did take some time.  If I had to guess, its possible that the php-fpm process timed out during the upgrade which resulted in the Gateway Timeout error.

Anyway, I've successfully completed the upgrade of our Moodle instance to 3.4.6

Thanks go out to you and Howard for your help.

Mike

In reply to Michael Dahlberg

Re: Gateway Timeout Error when upgrading

by Ken Task -
Picture of Particularly helpful Moodlers

Welcome.  Feel free to rate responses 'useful' ... another way to say 'Thanks'!

Yes, some things like an upgrade or automated backups will take time.  If one is sitting at the keyboard of that server, then no issues there.  But, if remotely accessing via terminal, then a terminal session time out could 'bite'.   On some servers, I have had to resort to using 'nohup [command] &' in terminal.  nohup means 'no hang up' ... ie, run the command until completed.  The process can be 'watched' by viewing the 'log' for nohup which is nohup.out file in same location as the command issued.

That way ... one could exit the terminal session ... go get a cup of java ... or lunch ... return later and one could see progress ... or, hopefully, completion.

That's one of things I've learned to love about linux ... multiple ways to 'skin a cat' ... so to speak.

'spirit of sharing', Ken


Average of ratings: Useful (1)
In reply to Michael Dahlberg

Re: Gateway Timeout Error when upgrading

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I would strongly discourage you from running a "non standard" Moodle as we have no idea what changes they have made. 

It's impossible to properly support it here. Please only use Moodle from moodle.org.