[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
How to simulate slow queries?
- To: openldap-technical@openldap.org
- Subject: How to simulate slow queries?
- From: Andrey Brindeyev <andrey.brindeew@gmail.com>
- Date: Mon, 24 Feb 2020 11:51:59 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=is+fTQnaRautAvOTkuUoaAK/Bf4HuPPOaF72lzUymdw=; b=Xqo9rcZiLy9jQPaylhcHXxqZuvEsfWhJ5U4MLY3qQ69ZtvYbki5MQ8hJ7tiqPQkaog koXcSuvFrFUsmZQSy9ZyNX91wQAZRR/NCmycr7ZVD8bDlQG8wSori/iyr5RzVKt21fyd bYQ3ATezyCq1x6GtmbXAxyS8d5EZeseZJB+otTLej9rR4sVgPcScxnzvo8U2qiCKU6S0 Iw6UzGBP2U/JBqUn1WgxnXnQnlNHnkc3nT0wtVnPKXgFBrLoACmSptkvPPUy5Gh16UKB Zw8JNpeyoGv5hLN49iBNHFSb7jOh18InoyRLwIiycrHhEN8zgsGcZlnS497Q+9yz9ECo M0JA==
Hello!
I'm trying to debug a specific issue that is related to slow queries, so I need a way how to simulate slow LDAP server responses.
It will be optimal if I can set a specific number of seconds per query shape, but a general (configured) delay is fine too.
I've already tried the retcode overlay, and I think it only simulates the slow bind scenarios and not the slow query responses.
Here's an excerpt from my slapd.conf:
overlay retcode
retcode-parent "ou=Users,dc=acme,dc=qa"
#retcode-item "uid=mdb" 0x00
retcode-item "uid=mdb" 0x00 sleeptime=4
retcode-item "cn=user1" 0x00
retcode-item "cn=user2" 0x00
retcode-item "cn=user3" 0x00
retcode-item "cn=user4" 0x00
retcode-item "cn=user5" 0x00
If there's no way this can be configured using existing options in OpenLDAP, I appreciate advice wherein the source code I need to insert the sleep construct. Ideally, it should work with the retcode overlay, so that I can test the slow bind scenarios and slow query responses at the same time.
Thanks,
Andrey.