We get a lot of DB_LOCK_DEADLOCK when using to programs that for a period of time continuosly writes to OpenLDAP. Version is 2.3.39.
The information added is of the form: ebcmdCustomer=0+ebcmdDir=220xx,ou=AuthCodes,ebcmdVersion=0,ebcmdProduct=ebcmd,dc=example,dc=com
where xx varies.
Snippet of the output: Mar 27 13:03:21 ldapt1 slapd[7589]: => bdb_dn2id_add: subtree (ebcmdCustomer=0+ebcmdDir=22037,ou=authcodes,ebcmdVersion=0,ebcmdProduct=ebcmd,dc=example,dc=com) put failed: -30995 Mar 27 13:03:26 ldapt1 slapd[7589]: => bdb_idl_insert_key: c_put id failed: DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock (-30995) Mar 27 13:03:26 ldapt1 slapd[7589]: => bdb_dn2id_add: parent (ou=authcodes,ebcmdVersion=0,ebcmdProduct=ebcmd,dc=example,dc=com) insert failed: -30995 Mar 27 13:03:28 ldapt1 slapd[7589]: => bdb_idl_insert_key: c_put id failed: DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock (-30995) Mar 27 13:03:28 ldapt1 slapd[7589]: => bdb_dn2id_add: parent (ou=authcodes,ebcmdVersion=0,ebcmdProduct=ebcmd,dc=example,dc=com) insert failed: -30995 Mar 27 13:03:36 ldapt1 slapd[7589]: => bdb_idl_insert_key: c_put id failed: DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock (-30995) Mar 27 13:03:36 ldapt1 slapd[7589]: => bdb_dn2id_add: parent (ou=authcodes,ebcmdVersion=0,ebcmdProduct=ebcmd,dc=example,dc=com) insert failed: -30995 Mar 27 13:03:38 ldapt1 slapd[7589]: => bdb_idl_insert_key: c_put id failed: DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock (-30995)
I see in the code that a key (the same it seems to be) is repeatedly written, and a comment is stating that /* Don't worry if it's already there */ (line 862 in servers/slapd/back-bdb/idl.c).
Is this to be expected or have we done something wrong?
/Stelios Grigoriadis
--On Tuesday, April 01, 2008 1:43 PM +0200 Stelios Grigoriadis stelios.xx.grigoriadis@ericsson.com wrote:
I see in the code that a key (the same it seems to be) is repeatedly written, and a comment is stating that /* Don't worry if it's already there */ (line 862 in servers/slapd/back-bdb/idl.c).
Is this to be expected or have we done something wrong?
It is to be expected.
In testing we did @ Zimbra, we found it to be substantially slower to do writes in parallel than to just serialize the writes. I suggest you rework your process. ;)
--Quanah
--
Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
Quanah Gibson-Mount wrote:
--On Tuesday, April 01, 2008 1:43 PM +0200 Stelios Grigoriadis stelios.xx.grigoriadis@ericsson.com wrote:
I see in the code that a key (the same it seems to be) is repeatedly written, and a comment is stating that /* Don't worry if it's already there */ (line 862 in servers/slapd/back-bdb/idl.c).
Is this to be expected or have we done something wrong?
It is to be expected.
In testing we did @ Zimbra, we found it to be substantially slower to do writes in parallel than to just serialize the writes. I suggest you rework your process. ;)
--Quanah
--
Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc
Zimbra :: the leader in open source messaging and collaboration
Actually, we're not trying to speed things up by writing in parallell. It just happens that the clients are on different machines and writes to the ldap master. So serialization is not an option.
/Stelios
openldap-technical@openldap.org