I am running Moodle version 3.3.2+ at our school. Somewhere I am having a problem with either the task scheduling or cron.
Here are some specifics.....
1) When I run cron, it seems to never finish, even after five hours. The hard drive light stays permanently lit. I have tried running cron from both the Moodle interface and the cli on the server. Both show the same behavior.
2) On the Moodle Scheduled Tasks page, I am able to run many tasks (besides session_cleanup_task) without problems. I can do the same on the server terminal.
3) However --- When I run the session_cleanup_task on the Moodle interface or the server terminal, it does not appear to complete, and the hard drive light stays permanently lit.
4) After I first set Moodle up, I copied several courses from a previous Moodle server, and restored them for a teacher. They work fine, but are now hidden - the teacher just uses them for reference.
5) When the hard drive light stays permanently lit with either cron or session_cleanup_task, I stop the hard drive from spinning by issuing the command: service mysql restart (This is on an UBUNTU server, version 16.04)
6) I have not yet let the cron or session_cleanup_task run all night because I am fearful for my hard drive. It could be that there is simply a great deal of cleanup that needs to be done, but since most other tasks complete in less than a minute, I am unsure.
7) I see no error messages in syslog, mysql log, or cron logs.
Do you folks think this is simply a matter of waiting enough hours for session_cleanup_task to complete? Overnight? Or do you think I may have a more serious problem?
I very much appreciate your help on this....
Robert