[Pkg-samba-maint] [Bug 3204] winbindd: Exceeding 200 client connections, no idle connection found

samba-bugs at samba.org samba-bugs at samba.org
Fri Jul 18 16:45:51 UTC 2014


https://bugzilla.samba.org/show_bug.cgi?id=3204

--- Comment #69 from Hemanth <hemanth.thummala at gmail.com> 2014-07-18 16:45:47 UTC ---
(In reply to comment #68)
> If child winbind's pile up waiting for something, this will inevitably happen.
> Maybe we should add an emergency "watchdog": If a winbind child does not reply
> within, say, 1 minute, call it dead. Start a new one even if this would exceed
> the max winbind domain children. If it does not come back for an hour, just
> kill it. No winbind request at all should take more than an hour, to me it
> would be reasonable to really kill that helper process after an hour busy time.
> 
> Comments?

Actually in our case, we did not see too many child winbindd processes. Infact
there are only 3 winbinnd processes. Parent/main winbindd was holding up too
many(>10K) FDs to the unix doamin socket.

I found following piece of code for winbindd_listen_fde_handler()

{
    struct winbindd_listen_state *s = talloc_get_type_abort(private_data,
                      struct winbindd_listen_state);

    while (winbindd_num_clients() > lp_winbind_max_clients() - 1) {
        DEBUG(5,("winbindd: Exceeding %d client "
             "connections, removing idle "
             "connection.\n", lp_winbind_max_clients()));
        if (!remove_idle_client()) {
            DEBUG(0,("winbindd: Exceeding %d "
                 "client connections, no idle "
                 "connection found\n",
                 lp_winbind_max_clients()));
            break;
        }
    }
    new_connection(s->fd, s->privileged);
}

Here we seem to be allowing more connections than the configured "max clients"
even if we dont find any idle/dead client connections. Due to this connection
list keeps growing and reached 10K in our case. Also on listening to every new
socket connection requests, we will be iterating through this list to find any
idle client connection. I think this one keeping windbindd busy and becoming
almost unresponsive for clients. Would also like to understand to allow the new
connections limitless when it exceed the max clients limit and no idle
connection are found.  

Also I am trying to understand the reason for having these winbindd client
connections for longer time. In my test setup, I could see the asynchronous
requests are getting processed quickly and closes the socket connection. But in
this case, these connections are holding up for longer time. 

As Volker points out, it would a good idea to make the sessions stale on
exceeding 60 seconds timeout. In this case, I assume no such request will take
more than 60 seconds to process by winbindd. 

Thanks,
Hemanth.

-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the Pkg-samba-maint mailing list