Error when editing user details (technical)

Error when editing user details (technical)

by Frank Black -
Number of replies: 4

v3.2

When I edit user details, after clicking save, the browser tab becomes unresponsive and Moodle will not load again in any new tab in that browser, until the browser is closed. When I open the browser again and log-in again, I can go to the user details and see that ONE field has been saved. I then change another field. The browser hangs again. Close it. Open it and login. Field has been saved. Change another field... etc. This has been going on since a clean install of v3.2 a couple of months back.

Yesterday by chance I had moodle open in another browser while I was editing user details. When Chrome hung, the other browser (IE11) automatically refreshed and showed the following error:

Error gc-ing sessions: Error writing to database•line 1584 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
•line 1904 of \lib\dml\moodle_database.php: call to mysqli_native_moodle_database->delete_records_select()
•line 627 of \lib\classes\session\manager.php: call to moodle_database->delete_records()
•line 791 of \lib\classes\session\manager.php: call to core\session\manager::kill_session()
•line 310 of \user\editadvanced.php: call to core\session\manager::gc()


Can anyone give me a pointer about what might be going wrong? Something I could pass on to the school technician to assist them in fixing the problem?

Average of ratings: -
In reply to Frank Black

Re: Error when editing user details (technical)

by Ken Task -
Picture of Particularly helpful Moodlers

Don't use windows ... don't have the issue ... so this is 'investigating' for your techs who should be investigating the error themselves (IMHO):

Are you using the DB for sessions as opposed to files?

The first line of the error:
Error gc-ing session ... blah, blah

line 310 of /usr/editadvanced.php is this one:

\core\session\manager::gc(); // Remove stale sessions.

In other lines of the debug

•line 627 of \lib\classes\session\manager.php: call to moodle_database->delete_records()

can't remove a record?

'spirit of sharing', Ken

In reply to Ken Task

Re: Error when editing user details (technical)

by Frank Black -

Thanks for your reply.

> so this is 'investigating' for your techs who should be investigating the error themselves

They appreciate that I try to find out what the problem is, and being pointed in the right direction right off the bat. They tend to give your issue more priority if you give them as much background info as possible and a starting point. Otherwise my problem is just one of a hundred poorly defined support requests.

> Are you using the DB for sessions as opposed to files?

Nope. Files, as per the default.

So, is there anything I can tell the techs about this problem?
Eg. The session is lost when I click 'save', so that Moodle cannot complete writing the edited fields to the database.

In reply to Frank Black

Re: Error when editing user details (technical)

by Ken Task -
Picture of Particularly helpful Moodlers

Oh ... so they want specifics ... well give it to them ...

In the statck trace, it references a liine ... go to that file in the trace, find the line, provide them the line (sometimes necessary to include the entire section surrounding the line).

Those are clues ... but they do indicate where a tech might focus their investigation.

Which is kinda what I did in reponse.

'spirit of sharing', Ken