Problem increasing max file descriptors (OS X Lion 10.7, PHP 5.3.8 via Macports)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]




I have a working socket server in PHP that I wish to improve (allow for more socket connections). I am running into a limit I can't crack, related to the max number of incoming socket connections. Using Macports for package management... I've recompiled PHP with the --enable-fd-setsize=2048 in the port file) … but I still get the following PHP warning once my socket server tries to accept more than 1024 clients (800, 900 are okay):
 
   PHP Warning:  socket_select(): You MUST recompile PHP with a larger value of FD_SETSIZE.
   It is set to 2048, but you have descriptors numbered at least as high as 1027.
    --enable-fd-setsize=2048 is recommended, but you may want to set it
   to equal the maximum number of open files supported by your system,
 
Weird right? Shows I have it set in PHP, so maybe it's a resource limit? But having changed sysctl.conf, ulimit -a shows:
 
   core file size          (blocks, -c) 0
   data seg size           (kbytes, -d) unlimited
   file size               (blocks, -f) unlimited
   max locked memory       (kbytes, -l) unlimited
   max memory size         (kbytes, -m) unlimited
   open files                      (-n) 2048
   pipe size            (512 bytes, -p) 1
   stack size              (kbytes, -s) 8192
   cpu time               (seconds, -t) unlimited
   max user processes              (-u) 709
   virtual memory          (kbytes, -v) unlimited
 
So I should be able to have up to 2048 files (sockets) open, but PHP still complains. What am I missing? Any ideas what I should try next?
 
...Rene





[PHP Home]     [PHP on Windows]     [Programming PHP]     [Kernel Newbies]     [Why pay for online dating?]     [PHP Users]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]     [PHP Books]

  Powered by Linux