Maximum limit of filepointer in php reached and not changeable

Posted by mlaug on Server Fault See other posts from Server Fault or by mlaug
Published on 2012-11-19T10:24:48Z Indexed on 2012/11/19 11:11 UTC
Read the original article Hit count: 325

Filed under:
|

I have a server with the current 5.3.x version installed. Since we are running a really simple and small server in php using sockets, that connects to a lot clients using sockets we need to raise the open file limit

that has been already done on the server for the user, that runs the server

#ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 29879
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 8192
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 29879
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

and we compiled php with

--enable-fd-setsize=8192

still we are getting

[19-Nov-2012 09:24:23 Europe/Berlin] PHP 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 1024.
--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.

once in a while in our logs. Anyone knows who to configure the unix server and php correctly to have that working?

I found a bug, but that is related to 2006 and marked as "not a bug"

https://bugs.php.net/bug.php?id=37025&edit=1

© Server Fault or respective owner

Related posts about php

Related posts about socket