Error writing to database

Error writing to database

by Laban Masengo -
Number of replies: 3

Hello,

Moodle has been installed successfully, and a course has been setup. But when I try to upload course content I then get the following error message "Error writing to database". Even after increasing the file upload limit to 100M and 200M it still gives the same error message, what can I do to resolve this?

This error is only occurring when I am  in "Add an activity or resource"


Herewith below the description;

error/moodle/dmlwriteexception

This indicates that a general error occurred when Moodle tried to write to the database. If you turn on Debugging you will get more detailed information about what the problem is.

MySQL

If you're using a MySQL database for your Moodle installation, this error can be caused by the server's max_allowed_packet size being configured incorrectly. Increasing this value may resolve the issue.
Average of ratings: -
In reply to Laban Masengo

Re: Error writing to 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

Firstly, please don't post the same thing multiple times in different forums. It just makes work for me deleting them and potentially dilutes and confuses your answers. Anyway...


Exactly what it says. You need to increase your MySQL's max_allowed_packet setting. 

How that is done depends on how MySQL was installed but you are probably looking for a file call my.cnf. 

In reply to Howard Miller

Re: Error writing to database

by Laban Masengo -

Hi Howard,

Thank you for your remark and reply to my post. Much appreciated.

However, the problem remains unresolved even after increasing the file upload size. The real problem occurs when I am adding an activity or a resources to my courses, i.e. a scorm package.

What could be the cause of this error in such case?


Thank you


Laban

In reply to Laban Masengo

Re: Error writing to 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

Who said anything about increasing the file upload size? wink

'max_allowed_packet'