flatfile cli sync hangs on unenrollment

flatfile cli sync hangs on unenrollment

by Hans Nonya -
Number of replies: 0

For some time now, we have noticed that the sync.php file from flatfile enrollments stalls out while processing the expired enrollments. We suspend expired enrollments and by adding some additional logging lines to the output, I have found that when the function process_expirations in enrollib.php calls role_unassign_all, that last functions seems to run to the end, but never seems to return back to the function where it is called from.


After looking in the database, I can also see that there is a lock on the user_enrollments table placed by a select query for which the update query is waiting. Potentially explaining why execution simply halts although it is strange that the role_unassign_all function is able to run to the closing } if that was the case.


What worries me even more is that it does not always stall on the same records, sometimes I can see it progress, only to stall again a few records later. This would indicate to me that it is not a particular record that is causing the issue.


Moodle is running on IIS with an MSSQL Express database on the same machine.

Average of ratings: -