Upgrade to 3.3 and Error reading from database

Upgrade to 3.3 and Error reading from database

by sara HHH -
Number of replies: 8

Hi,

i want to upgrade my test moodle from 3.1. to 3.3. i upgrade also my php from 5.5. to 5.6 which was necessary.

and mysql version is:     mysql  Ver 15.1 Distrib 5.5.52-MariaDB, for Linux (x86_64) using readline 5.1

i face this error when i open my web:


when i clik to more information it comes this page:

https://docs.moodle.org/33/en/error/moodle/dmlreadexception

that it is not helpfull.

could you please help me.

Many Thanks

Average of ratings: -
In reply to sara HHH

Re: Upgrade to 3.3 and Error reading from database

by Deepak Gour -

Hi Sanaz

You need to change some value in code.

Goto moodle source file ->  lib -> dml - >mysqli_native_moodle_database.php

In the mysqli_native_moodle_database.php find @@default_storage_engine to change   @@storage_engine.

hope that is help to you.

In reply to Deepak Gour

Re: Upgrade to 3.3 and Error reading from database

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

DON'T change core code. Don't do that. There is absolutely no reason to do so. 

Average of ratings: Useful (1)
In reply to sara HHH

Re: Upgrade to 3.3 and Error reading from database

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

It would help to give us some more information. 

What were you doing when that error appeared?  Try again with Debugging turned up full.

If the only thing you changed was PHP, then it would make sense that the issue is a problem in your PHP configuration. We just need to figure out what. Did you definitely include the appropriate mysql modules in the new PHP build?

In reply to sara HHH

Re: Upgrade to 3.3 and Error reading from database

by Ken Task -
Picture of Particularly helpful Moodlers

+1 to what Howard said ... don't edit/change core code.

While that help link wasn't all that helpeful, could be because such an error is pretty generic so nothing could be written in the help that was 100% on target ... so let's look a what might have happened (did to me - and you might have done the same thing I did!):

When your site was a 3.1, did you update the component in Environment check and check environment?   Did that show any 'must fix'.    Versions are not the issue with DB - it's engine/collation with the DB server and the DB for the Moodle.

Check the version.php file in moodle code.   There is a line in there that tells what version of the code is present.  What does the '$release' line say.

And there has been added a new line in fresh installs of 3.3 ...

actually an array of *options* for the database.   Here's a clip from config-dist.php of  a working site:

$CFG->dboptions = array(
    'dbpersist' => false,       // should persistent database connections be
                                //  used? set to 'false' for the most stable
                                //  setting, 'true' can improve performance
                                //  sometimes
    'dbsocket'  => false,       // should connection via UNIX socket be used?
                                //  if you set it to 'true' or custom path
                                //  here set dbhost to 'localhost',
                                //  (please note mysql is always using socket
                                //  if dbhost is 'localhost' - if you need
                                //  local port connection use '127.0.0.1')
    'dbport'    => '',          // the TCP port number to use when connecting
                                //  to the server. keep empty string for the
                                //  default port
    'dbhandlesoptions' => false,// On PostgreSQL poolers like pgbouncer don't
                                // support advanced options on connection.
                                // If you set those in the database then
                                // the advanced settings will not be sent.
    'dbcollation' => 'utf8mb4_unicode_ci', // MySQL has partial and full UTF-8
                                // support. If you wish to use partial UTF-8
                                // (three bytes) then set this option to

'spirit of sharing', Ken

In reply to Ken Task

Re: Upgrade to 3.3 and Error reading from database

by sara HHH -

Hi,


man thnaks for all of you.

i have changed /etc/my.cnf and also php mysql_compressed_rows.php --fix.

it works now.


In reply to sara HHH

Odp: Re: Upgrade to 3.3 and Error reading from database

by Kate James -

Hi,

what's your look /etc/my.conf ? 

In reply to Ken Task

Re: Upgrade to 3.3 and Error reading from database

by arnel marquez -

hi ken,

good day.

i have configured moodle 3.4 with moodle in dell rack server r320 and database located in VMware.

dell server, 32GB mem

vmware, 32GB mem

number of users: 600+

teachers courses are from moodle 3.3 backup.

Already adjusted the max_connection in the mariadb to 1024.

The issue is we are experiencing error reading in database on few computers.

Your advise on this matter will be a great help for us. thanks.


sincerely,

arnel

In reply to arnel marquez

Re: Upgrade to 3.3 and Error reading from database

by Ken Task -
Picture of Particularly helpful Moodlers

@Arnel ... one can run any OS on the hardware you have.   Do you run Linux or Windows?

Don't do Windows any more and can't help.

If linux, what OS (Ubuntu/CentOS and version?

Will say this that value for max_allowed_connections sounds like a lot for 600+ users - are those 600+ users connected at one time? 

If one has that much traffic it might be that you need to have a dedicated machine for DB.

Individual workstation/users access issues almost have  to do that one by one ... each might be different.

References in error logs?

'spirit of sharing', Ken