Univention Bugzilla – Attachment 9693 Details for
Bug 47926
ReconnectLDAPObject does not reconnect on ldap.UNAVAILABLE exceptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
reproduce
slapit.py (text/x-python), 844 bytes, created by
Jürn Brodersen
on 2018-10-08 16:21:50 CEST
(
hide
)
Description:
reproduce
Filename:
MIME Type:
Creator:
Jürn Brodersen
Created:
2018-10-08 16:21:50 CEST
Size:
844 bytes
patch
obsolete
>import time >import threading >import subprocess > >from univention.uldap import getMachineConnection > > >def foo(): > lo = getMachineConnection() > lo.lo._retry_max = 10E4 > lo.lo._retry_delay = .001 > x = 0 > lo.search(filter="uid=Administrator", attr=["uid"]) > s = time.time() > print("go") > while (time.time() - s) < run_time: > x += 1 > lo.search(filter="uid=Administrator", attr=["uid"]) > print("Searches per sec: {}".format(x / run_time)) > > >thread_count = 100 >run_time = 10.0 >my_thread = [None] * thread_count >for i in range(0, thread_count): > my_thread[i] = threading.Thread(target=foo) >for t in my_thread: > t.start() >print("warmup") >time.sleep(3) >print("restart slapd") >subprocess.check_call(["systemctl", "restart", "slapd.service"]) >print("restarted") >for t in my_thread: > t.join() > >print("done")
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 47926
: 9693