Is MySQL 5.7 compatible for Moodle 3.4?

Re: Re: Re: Is MySQL 5.7 compatible for Moodle 3.4?

by Ken Task -
Number of replies: 0
Picture of Particularly helpful Moodlers

From the information/error in logs you shared, looks like an issue with your DB being overloaded with trying to manage session info.

So here's some docs to look at:

https://docs.moodle.org/37/en/Session_handling
https://docs.moodle.org/37/en/Sessions_FAQ

Depending upon size of site and just how hard one wants to make admin of Moodle, try this to see if it doesn't make those errors go away in your logs:

In config.php add a line just below the line that defines 'admin', like this:

$CFG->dbsessions='0';

That turns logging sessions to the database.  Takes affect immediately.  No need to restart any services ... apache/httpd/nginx nor mysqld.

Does login speed up?   See any more errors in server logs?

Now for an admin level person ... your info about the session is larger ... thus larger sessions file.

You should see in moodledata a 'sessions' directory and as folks login, a sessions file is created for them.

To un-do ... just put // in front of that line you added.

The original question asked if MySQL 5.7 was OK to use with Moodle 3.4.   It is.

Now if you are still having issues, suggest installing and running MySQLTuner.   Could be you need to tweak DB settings.

https://www.google.com/search?q=mysqltuner

'SoS', Ken