#37025 [Opn]: FD_SETSIZE error
| From: | linuxapps at yahoo dot com | Date: | Sun, 09 Apr 2006 21:52:02 +0000 |
| Subject: | #37025 [Opn]: FD_SETSIZE error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-95505@lists.php.net to get a copy of this message | ||
ID: 37025
User updated by: linuxapps at yahoo dot com
Reported By: linuxapps at yahoo dot com
Status: Open
Bug Type: Sockets related
Operating System: Fedora Core 4
PHP Version: 5.1.2
New Comment:
Correction. Bug appears in CLI and CGI modes.
Previous Comments:
------------------------------------------------------------------------
[2006-04-09 16:59:29] linuxapps at yahoo dot com
Description:
------------
When compiled with --disable-cgi, PHP CLI throws an
error on socket_select() when socket count > 1024.
It appears that the CLI installation defaults to
FD_SETSIZE=1024 regardless of what is set at compile
time via --enable-fd-setsize. PHP CGI, however, works
properly.
This error happens identically to both sockets and
socket streams (e.g. stream_select()). The code example
uses sockets.
Reproduce code:
---------------
http://fourthround.com/bugs/server.txt
http://fourthround.com/bugs/stester.txt
Expected result:
----------------
As long as the OS's open file limit has not been
exceeded PHP CLI should not throw an error when compiled
with --enable-fd-setsize=4096 and socket_select on over
1024 sockets.
Actual result:
--------------
Warning: socket_select(): You MUST recompile PHP with a
larger value of FD_SETSIZE. It is set to 1024, but you
have descriptors numbered at least as high as 1054. --
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, in order to avoid seeing this
error again at a later date.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37025&edit=1