diff options
author | Simo Sorce <idra@samba.org> | 2011-08-17 15:21:12 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2011-08-21 09:05:06 -0400 |
commit | 91ba8aec13f42c83190c5cecf4ec7e0e80d91dcc (patch) | |
tree | bda18b735ad2ee2fcbdf0592096084d45e38db8c /source3/lib/server_prefork_util.c | |
parent | 98d2bf052e214580a3ca3146b10688c9e1c7bc78 (diff) | |
download | samba-91ba8aec13f42c83190c5cecf4ec7e0e80d91dcc.tar.gz samba-91ba8aec13f42c83190c5cecf4ec7e0e80d91dcc.tar.bz2 samba-91ba8aec13f42c83190c5cecf4ec7e0e80d91dcc.zip |
s3-prefork: Add parent->client messaging
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
Diffstat (limited to 'source3/lib/server_prefork_util.c')
-rw-r--r-- | source3/lib/server_prefork_util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/lib/server_prefork_util.c b/source3/lib/server_prefork_util.c index 638ce66f09..01c7994f60 100644 --- a/source3/lib/server_prefork_util.c +++ b/source3/lib/server_prefork_util.c @@ -67,6 +67,7 @@ void pfh_manage_pool(struct tevent_context *ev_ctx, time_t now = time(NULL); int total, avail; int ret, n; + bool msg = false; if ((cfg->prefork_status & PFH_NEW_MAX) && !(cfg->prefork_status & PFH_ENOSPC)) { @@ -119,6 +120,7 @@ void pfh_manage_pool(struct tevent_context *ev_ctx, if (n == avail) break; n = avail; } + msg = true; } else if (avail > total + cfg->spawn_rate) { n = avail; while (avail > total + cfg->spawn_rate) { @@ -130,6 +132,14 @@ void pfh_manage_pool(struct tevent_context *ev_ctx, } } + /* send message to all children when we change maximum allowed + * connections, so that they can decide to start again to listen to + * sockets if they were already topping the number of allowed + * clients. Useful only when we increase allowed clients */ + if (msg) { + prefork_warn_active_children(msg_ctx, pool); + } + DEBUG(10, ("Stats: children: %d, allowed connections: %d\n", prefork_count_children(pool, NULL), prefork_count_allowed_connections(pool))); |