General developer forum

LDAP Sync - users can't log in when script is running because it blocks writes to mdl_user

 
Picture of Joe Cape
LDAP Sync - users can't log in when script is running because it blocks writes to mdl_user
 

I am keen to address the issue that others have had with the LDAP sync job (e.g. https://moodle.org/mod/forum/discuss.php?d=278900).


Has anyone developed a fix for this? I would like to try Eseosa's suggestion in the above thread:


"I find running transaction in batches help alleviate issue. 

../auth/ldap/auth.php

Using $xcount as counter - if X records, commit transaction and restart new transaction.

So far, no deadlocks detected on system."


If anyone else has gone ahead with this, it would be great to know:


1. How large are the batches in which transactions are committed (how many users should be processed per commit).

2. Which stage of the sync job is causing the issue. I haven't looked into this yet -  I will need to find out which of the two transactions needs to be managed in batches in this way.


Thanks!

 
Average of ratings: -
Picture of Joe Cape
Re: LDAP Sync - users can't log in when script is running because it blocks writes to mdl_user
 
Average of ratings: -