Problem: S4connector shows rejects with memoryError

Problem:

The s4-connector shows the following Reject in the /var/log/univention/connector-s4.log

04.11.2019 06:29:02.254 LDAP        (PROCESS): sync from ucs: [         group] [    modify] cn=Computers,cn=groups,DC=schein,DC=me
04.11.2019 06:29:02.255 LDAP        (INFO   ): sync_from_ucs: add object: cn=Computers,cn=groups,DC=schein,DC=me
04.11.2019 06:29:02.255 LDAP        (INFO   ): sync_from_ucs: lock UCS entryUUID: 795f3196-11f8-1037-9a24-7bf68182dc5e
04.11.2019 06:29:02.255 LDAP        (INFO   ): LockingDB: Execute SQL command: 'SELECT id FROM UCS_LOCK WHERE uuid=?;', '('795f3196-11f8-1037-9a24-7bf68182dc5e',)'
04.11.2019 06:33:49.104 LDAP        (WARNING): sync failed, saved as rejected
        /var/lib/univention-connector/s4/1534251808.395077
04.11.2019 06:33:49.445 LDAP        (WARNING): Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 877, in __sync_file_from_ucs
    if ((old_dn and not self.sync_from_ucs(key, mapped_object, pre_mapped_ucs_dn, unicode(old_dn, 'utf8'), old, new)) or (not old_dn and not self.sync_from_ucs(key, mapped_object, pre_mapped_ucs_dn, old_dn, old, new))):
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/__init__.py", line 2364, in sync_from_ucs
    if entryUUID and not self.lockingdb.is_ucs_locked(entryUUID):
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/lockingdb.py", line 124, in is_ucs_locked
    rows = self.__execute_sql_commands(sql_commands, fetch_result=True)
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/lockingdb.py", line 176, in __execute_sql_commands
    ud.debug(ud.LDAP, ud.INFO, "LockingDB: Return SQL result: '%s'" % rows)
MemoryError

Investigation:

The locking DB seems to have a Problem:

ud.debug(ud.LDAP, ud.INFO, “LockingDB: Return SQL result: ‘%s’” % rows)
MemoryError

Solution:

Clean the database and remove existing rejects

/etc/init.d/univention-s4-connector stop
sqlite3 /etc/univention/connector/lockingdb.sqlite
sqlite> DELETE from S4_LOCK;
sqlite> DELETE from UCS_LOCK;  
sqlite> VACUUM;
sqlite>.quit
/etc/init.d/univention-s4-connector start
Mastodon