Hi,

Thanks. I did as suggested (recompiled PHP with "configure.args-append 
--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 
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 complains. 
Any ideas what I should try next?


On 2011-11-05, at 6:02 PM, Jeremy Lavergne wrote:

>> My question is, is it possible to use PHP via Macports but with the 
>> "--enable-fd-setsize=2048" option?
> 
> You ought to be able to add this to your Portfile to add that configuration 
> it:
> configure.args-append --enable-fd-setsize=2048
> 
> Once it's there, uninstall and reinstall but be sure to force macports to 
> build from source, like so:
> port -s install php5
> 
> 
> 
> You can similarly use configure.args-delete to remove arguments.
> 

_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Reply via email to