The Samba-Bugzilla – Attachment 7930 Details for
Bug 9127
Problem of pile up of winbindd client connections.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
One possible fix for the issue observed.
master_diff.patch (text/plain), 1.19 KB, created by
ravindra (mail address dead)
on 2012-09-24 11:43:26 UTC
(
hide
)
Description:
One possible fix for the issue observed.
Filename:
MIME Type:
Creator:
ravindra (mail address dead)
Created:
2012-09-24 11:43:26 UTC
Size:
1.19 KB
patch
obsolete
>diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c >index eab62a7..7db0d42 100644 >--- a/source3/winbindd/winbindd.c >+++ b/source3/winbindd/winbindd.c >@@ -961,6 +961,32 @@ struct winbindd_listen_state { > int fd; > }; > >+static void winbindd_check_and_clean_dead_clients() { >+ >+ struct winbindd_cli_state *state = NULL; >+ int count = 0; >+ int i = 0; >+ >+ struct winbindd_cli_state* state_arr[1024]; >+ for (i = 0; i < 1024; i++) { >+ state_arr[i] = NULL; >+ } >+ >+ for (state = winbindd_client_list(); state; state = state->next) { >+ if (state->pid && (kill(state->pid, 0) == -1) && (count<1024)) { >+ state_arr[count++] = state; >+ } >+ } >+ >+ if (count) { >+ for (i = 0; i < count; i++) { >+ if (state_arr[i]) { >+ remove_client(state_arr[i]); >+ } >+ } >+ } >+} >+ > static void winbindd_listen_fde_handler(struct tevent_context *ev, > struct tevent_fd *fde, > uint16_t flags, >@@ -982,6 +1008,11 @@ static void winbindd_listen_fde_handler(struct tevent_context *ev, > } > } > new_connection(s->fd, s->privileged); >+ if (winbindd_num_clients() > (lp_winbind_max_clients()/4) ) { >+ DEBUG(5,("winbindd: Checking for dead clients. \n")); >+ winbindd_check_and_clean_dead_clients(); >+ } >+ > } > > /*
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 9127
:
7857
|
7902
| 7930