[Exim] RLIMIT_NOFILE problem (should be FD_SETSIZE not 1000)

Top Page
Delete this message
Reply to this message
Author: J. Nick Koston
Date:  
To: Exim Users Mailing List
Subject: [Exim] RLIMIT_NOFILE problem (should be FD_SETSIZE not 1000)
exim 4.20 sets RLIMIT_NOFILE to 1000 in src/exim.c line 2371

  2367    }
  2368  else
  2369    {
  2370    struct rlimit rlp;
  2371    rlp.rlim_cur = rlp.rlim_max = 1000;
  2372    #ifdef RLIMIT_NOFILE
  2373    (void)setrlimit(RLIMIT_NOFILE, &rlp);
  2374    #endif


This can cause problems if exim is spawned from a webserver running php
which has > 1000 fds open (log files etc).   This is pretty common on
machines running lots of virtual hosts.    This really should be set to
FD_SETSIZE and not 1000.


http://host.cpanel.net/~nick/exim.fdsetsize.patch
--
J. Nick Koston <nick@???>
cPanel, Inc.