LDAP - Cron Synchronization Problems

LDAP - Cron Synchronization Problems

by Ryan Lowry -
Number of replies: 0

Hi,

I've been experimenting with the LDAP sync_users script to add new / update existing users from ADLDS to Moodle.

The script works well enough but is very slow (we have approximately 98000 users).

My problem is that while the script is running users with LDAP accounts cannot login. I get the following error messages:

Error writing to database

Debug info: 

UPDATE mdl_user SET lastlogin = ?,currentlogin = ?,lastaccess = ?,lastip = ? WHERE id = ?

[array (

0 => '1426004353',

1 => 1426005125,

2 => 1426005125,

3 => '10.20.2.13',

4 => '4020',

)] 

Error code: dmlwriteexception

Stack trace:

line 446 of \lib\dml\moodle_database.php: dml_write_exception thrown

line 242 of \lib\dml\mssql_native_moodle_database.php: call to moodle_database->query_end()

line 997 of \lib\dml\mssql_native_moodle_database.php: call to mssql_native_moodle_database->query_end()

line 1030 of \lib\dml\mssql_native_moodle_database.php: call to mssql_native_moodle_database->update_record_raw()

line 3453 of \lib\moodlelib.php: call to mssql_native_moodle_database->update_record()

line 4617 of \lib\moodlelib.php: call to update_user_login_times()

line 181 of \login\index.php: call to complete_user_login()


Error reading from database

Debug info: 

SELECT * FROM mdl_context WHERE contextlevel = ? AND instanceid = ?

[array (

0 => 50,

1 => '1',

)] 

Error code: dmlreadexception

Stack trace:

line 443 of \lib\dml\moodle_database.php: dml_read_exception thrown

line 242 of \lib\dml\mssql_native_moodle_database.php: call to moodle_database->query_end()

line 724 of \lib\dml\mssql_native_moodle_database.php: call to mssql_native_moodle_database->query_end()

line 758 of \lib\dml\mssql_native_moodle_database.php: call to mssql_native_moodle_database->get_recordset_sql()

line 1476 of \lib\dml\moodle_database.php: call to mssql_native_moodle_database->get_records_sql()

line 1448 of \lib\dml\moodle_database.php: call to moodle_database->get_record_sql()

line 1427 of \lib\dml\moodle_database.php: call to moodle_database->get_record_select()

line 6860 of \lib\accesslib.php: call to moodle_database->get_record()

line 4374 of \lib\accesslib.php: call to context_course::instance()

line 833 of \lib\outputrenderers.php: call to is_role_switched()

line 2623 of \lib\outputrenderers.php: call to core_renderer->header()

line ? of unknownfile: call to core_renderer->fatal_error()

line 1649 of \lib\setuplib.php: call to call_user_func_array()

line 362 of \lib\setuplib.php: call to bootstrap_renderer->__call()

line 362 of \lib\setuplib.php: call to bootstrap_renderer->fatal_error()

line ? of unknownfile: call to default_exception_handler()


Once the script completes users can login. Our setup is as follows:

Server: IIS 8.5

DatabaseMicrosoft SQL Server 2012

Has anybody experienced a similar issue?

Cheers,

Ryan


Average of ratings: -