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 
   It is set to 2048, but you have descriptors numbered at least as high as 
    --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?

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to