Can anyone suggest what might be causing this error:
error: origin=res.on, msg=LDAP_AD :: ldapSearch :Time Limit Exceeded
{ TimeLimitExceededError: Time Limit Exceeded
at messageCallback (/node_modules/ldapjs/lib/client/client.js:1419:45)
at Parser.onMessage (/node_modules/ldapjs/lib/client/client.js:1089:14)
at emitOne (events.js:96:13)
at Parser.emit (events.js:188:7)
at Parser.write (/node_modules/ldapjs/lib/messages/parser.js:111:8)
at end (/node_modules/ldapjs/lib/messages/parser.js:66:19)
at Parser.write (/node_modules/ldapjs/lib/messages/parser.js:112:10)
at TLSSocket.onData (/node_modules/ldapjs/lib/client/client.js:1076:22)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7) lde_message: 'Time Limit Exceeded', lde_dn: null }
It appears to happen on longer queries when we send thru multiple searches. If we send them one at a time they appear to work fine. When we try sending the same queries thru other tools like ldapsearch CLI they all appear to work and return in 20-30 seconds each. However the ldapjs appear to be returning this message back in less than 30 seconds. the idleTimeout connectTimeout and timeout are all set to well over 5 mins.
Can reproduce this problem as well.
idleTimeout, connectTimeout, and timeout are set extremely high (over 10 minutes).
I seem to get this TimeLimitExceededError after 10 seconds.
EDIT:
Looking at the docs for .search():
timeLimit | the maximum amount of time the server should take in responding, in seconds. Defaults to 10. Lots of servers will ignore this.
Try manually setting this to a larger value in your options?
var opts = {
filter: '(&(l=Seattle)(email=*@foo.com))',
scope: 'sub',
attributes: ['dn', 'sn', 'cn'],
timeLimit: 6000, // 10 minutes in seconds or limit of your choice
};
I believe this has been sufficiently answered. Feel free to re-open if you still have questions.
Most helpful comment
EDIT:
Looking at the docs for .search():
timeLimit | the maximum amount of time the server should take in responding, in seconds. Defaults to 10. Lots of servers will ignore this.Try manually setting this to a larger value in your options?