[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: FD_SETSIZE problems on a high-end server



This question comes up enough that I added a FAQ answer for it:
        http://www.openldap.org/faq/index.cgi?file=1126


At 08:50 AM 10/19/2004, Rodrigo Henriquez M. - Corporacion Linux S.A. wrote:

>Hi folks.
>
>This is my first post on this list.
>
>Well, I'm having troubles with a high-end server, due to the 
>_FD_SETSIZE (from glibc) limitation.
>
>I have a Debian Sarge/OpenLDAP service on a P4 server with
>1Gb RAM which have around 8000 records.
>
>This server attends to another mail server which have Postfix,
>Cyrus and SASL.
>
>The Postfix server do a lookup on a aliases table on this LDAP 
>and all other services ask for the authenticacion to SASL which
>ask to the LDAP service.
>
>The real problem, is that the SASL services is generating more
>than 1024 concurrent sockets to the LDAP service which block
>the remains incomming sockets.
>
>I already do all the possible changes to the server (ulimit, 
>sysctl, etc) without a solution.
>
>All the incoming connections stop at the 1024 concurrent socket.
>
>I was looking at the source code of the OpenLDAP, and I figured 
>out that it uses the select() function.
>
>This takes the _FD_SETSIZE glibc value which is hardcoded to 1024
>and I find no way to change this value on the fly.
>
>My questions are:
>
>- Exists another OpenLDAP implementation with the poll() function
>instead select()? A patch or something?
>
>- How can solve this problem without recompile the glibc with a 
>higher value? 
>
>The server is in a production environment, and I don't want 
>make this kind of changes on it.
>
>If anyone knows something, it will be very useful. 
>
>TIA.
>
>My best regards.
>
>
>-- 
>Rodrigo Henriquez M.            http://www.corporacionlinux.cl
>Corporacion Linux S.A.          Fonos: 02 2442988 - 02 2444250