On the conn_max_pending and conn_max_pending_auth params, what exactly is a "pending request"? Is this a request that slapd has not yet processed? For example, is a search request "pending" if slapd is in the process of evaluating it, but has not yet returned?
Thanks,
Matt
TechnoSophos wrote:
On the conn_max_pending and conn_max_pending_auth params, what exactly is a "pending request"? Is this a request that slapd has not yet processed? For example, is a search request "pending" if slapd is in the process of evaluating it, but has not yet returned?
Pending means it is queued; it has not started at all. As a loose restriction to prevent a single client from hogging all of the server resources, no connection is allowed to use more than half of the total number of server threads. E.g., with the default of 16 threads in the thread pool, any connection can have only 8 operations executing at once. When it reaches that limit, new requests are queued on that connection - these are the pending operations.
Of course this is a pretty loose control, and if you have more active connections than you have server threads, it becomes somewhat meaningless. I.e., requests get pulled off a connection's pending operation queue to be submitted to the thread pool, and may continue to wait there until a thread becomes available.
<quote who="TechnoSophos">
On the conn_max_pending and conn_max_pending_auth params, what exactly is a "pending request"? Is this a request that slapd has not yet processed? For example, is a search request "pending" if slapd is in the process of evaluating it, but has not yet returned?
Yes.
As per slapd.conf(5):
conn_max_pending <integer>
Specify the maximum number of pending requests for an anonymous session. If requests are submitted faster than the server can process them, they will be queued up to this limit. If the limit is exceeded, the session is closed. The default is 100.
conn_max_pending_auth <integer>
Specify the maximum number of pending requests for an authenticated session. The default is 1000.
openldap-software@openldap.org