I can't log into Moodle between 7-9am each morning

I can't log into Moodle between 7-9am each morning

by Aretha Etienne -
Number of replies: 11

I have upgraded to Moodle3.2.4 and I can't log in to Moodle during 7-9am each morning.  I have to reboot the server in order to log in to the Moodle site.  I've looked at the scheduled tasks and my automated backups are running @ 1am 

I can log in to the site @ 6am but it just hangs from @ 7am -9am.  Does anybody have any ideas what may be causing this?  This happens on my Test site, but on my Production site, which is Moodle 3.0.7, I have no problems logging in.


I am using PHP 5.3.30+deb8u1

The server is a virtual server.  linnux

mysql 5.5

Average of ratings: -
In reply to Aretha Etienne

Re: I can't log into Moodle between 7-9am each morning

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

Something must be going on....

run top, try 'show processlist' in MySQL

Run 'munin'.

Try to infer what is happening around that time. 

In reply to Howard Miller

Re: I can't log into Moodle between 7-9am each morning

by Aretha Etienne -

I'll do that in the morning.  But for now, do you have any other suggestions?

In reply to Aretha Etienne

Re: I can't log into Moodle between 7-9am each morning

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

I wonder if some other person on the same physical server where your virtual server resides might be running some big, or weird database task every morning?  In theory, this shouldn't be a problem.

Have you talked with your hosting company?

In reply to Howard Miller

Re: I can't log into Moodle between 7-9am each morning

by Aretha Etienne -

Hi,


  I ran that command and the following output appears:screenshot of show processlist


In reply to Aretha Etienne

Re: I can't log into Moodle between 7-9am each morning

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Bingo!
You've found the culprit, a not requested optimization scanning the biggest Moodle table: https://stackoverflow.com/questions/22957388/disable-mysql-daily-table-optimization#comment-35051284.

HTH,
Matteo

Average of ratings: Useful (2)
In reply to Matteo Scaramuccia

Re: I can't log into Moodle between 7-9am each morning

by Aretha Etienne -

Is there any harm in disabling this?

In reply to Aretha Etienne

Re: I can't log into Moodle between 7-9am each morning

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 just disable this. I've been trying to work out if it is a standard thing with Debian/Ubuntu and I don't think it is. 

It's the sort of thing you might want to run manually on occasions (at quiet times)

In reply to Howard Miller

Re: I can't log into Moodle between 7-9am each morning

by Aretha Etienne -

That was the culprit.  I noticed this issue when I fixed the "unsupported_db_table_row_format" by converting InnoDB to Barracuda.  This caused the delay with the optimization each morning.