Skip to content

Commit dc5846a

Browse files
SBUS: increase SBUS_MESSAGE_TIMEOUT to 5 mins
Handling BE_REQ_INITGROUPS for LDAP user with 10k groups takes longer than 2 mins.
1 parent 6afffac commit dc5846a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/responder/common/responder_common.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include <popt.h>
3434
#include <dbus/dbus.h>
3535

36+
#include "sbus/sbus_message.h"
3637
#include "util/util.h"
3738
#include "util/strtonum.h"
3839
#include "db/sysdb.h"
@@ -1073,6 +1074,13 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
10731074
rctx->client_idle_timeout = 10;
10741075
}
10751076

1077+
if (rctx->client_idle_timeout > SBUS_MESSAGE_TIMEOUT) {
1078+
DEBUG(SSSDBG_CONF_SETTINGS, "'"CONFDB_RESPONDER_CLI_IDLE_TIMEOUT
1079+
"' is configured to a value %d - higher than SBUS_MESSAGE_TIMEOUT %d, "
1080+
"this usually doesn't make sense.\n",
1081+
rctx->client_idle_timeout, SBUS_MESSAGE_TIMEOUT);
1082+
}
1083+
10761084
if (rctx->socket_activated) {
10771085
ret = responder_setup_idle_timeout_config(rctx);
10781086
if (ret != EOK) {

src/sbus/sbus_message.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@
2929

3030
/* Use longer default timeout than libdbus default due to expensive
3131
* selinux operation: see https://bugzilla.redhat.com/show_bug.cgi?id=1654537
32+
* Another example of a very long running operation - BE_REQ_INITGROUPS where
33+
* the user is a member of tens of thousands of groups.
3234
*/
33-
#define SBUS_MESSAGE_TIMEOUT 120000
35+
#define SBUS_MESSAGE_TIMEOUT 300000
3436

3537
/**
3638
* Bound message with a talloc context.

0 commit comments

Comments
 (0)