Moodle Freezes 4.2

Moodle Freezes 4.2

by Yonal Satwam -
Number of replies: 4
our moodle freezes. When i check my MSSQL DB i can see it is locked by this this query. If i kill the process then page loads 

INSERT INTO mdl_logstore_standard_log (eventname,component,action,target,objecttable,objectid,crud,edulevel,contextid,contextlevel,contextinstanceid,userid,courseid,relateduserid,anonymous,other,timecreated,origin,ip,realuserid) VALUES(N'\core\event\user_password_updated',N'core',N'updated',N'user_password',NULL,NULL,N'u','0','50','30','5','2','0','5','0',N'{"forgottenreset":false}','1686804189',N'cli',N'192.168.67.168',NULL)

This is causing a big issue.

Can i know solution for this ?
Average of ratings: -
In reply to Yonal Satwam

Ri: Moodle Freezes 4.2

by Sergio Rabellino -
Picture of Particularly helpful Moodlers Picture of Plugin developers
The evidence it's that your DBMS has some problems: the mdl_logstore_standard_log table it's too big or your disk is full ?
You should try to replicate directly this DB insertion from a direct SQL interface and see what's happening. Moodle relies on the connected DB, if the DB does not work, then Moodle will not work.
In reply to Sergio Rabellino

Re: Ri: Moodle Freezes 4.2

by Yonal Satwam -
Thanks Sergio,


When I open Edwiser reports and then after some time our Moodle slows down and page doesn’t load.

Upon checking the MSSQL database in activity monitor

 

These 2  SQL statements are blocking processes

 

 

  1.  

SELECT COUNT(l.userid) AS usercount

                  FROM mdl_logstore_standard_log l

                  JOIN mdl_user u ON u.id = l.userid

                  JOIN #mdl_tmp_au_f_349 ut WITH (NOLOCK) ON u.id = ut.tempid

                 WHERE l.action = N'viewed'

                   AND l.courseid = '16'

                   AND u.deleted = 0

 

When I run this query  I get this result:

 

Msg 208, Level 16, State 0, Line 1

Invalid object name '#mdl_tmp_au_f_349'.

 

 

  1.  

 

INSERT INTO mdl_logstore_standard_log (eventname,component,action,target,objecttable,objectid,crud,edulevel,contextid,contextlevel,contextinstanceid,userid,courseid,relateduserid,anonymous,other,timecreated,origin,ip,realuserid) VALUES(N'\core\event\user_password_updated',N'core',N'updated',N'user_password',NULL,NULL,N'u','0','50','30','5','2','0','5','0',N'{"forgottenreset":false}','1686809826',N'cli',N'192.168.67.168',NULL)

 

 

                

 

 

When I kill these processes then page loads normal again.

In reply to Yonal Satwam

Ri: Re: Ri: Moodle Freezes 4.2

by Sergio Rabellino -
Picture of Particularly helpful Moodlers Picture of Plugin developers
I'm not an MSSQL expert, but it seems that you're in trouble with TEMP areas (maybe the memory or the disks are full?).
You should ask an MSSQL expert to diagnose the errors in your DBMS, as this does not seem to be a Moodle-related problem.