← Back to team overview

ius-community team mailing list archive

PHP modifications request?

 

Hi guys,

I've started seeing bunch of these kind of alerts:

WARNING - stream_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 1073. --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.

Would it be acceptable to increase the FD_SETSIZE in PHP build that you guys maintain?

Thing is, I have to take the src.rpm and recompile it every time there's a new minor/major version available. I'm not really fan of hardcoding limits inside applications - after all that's what we have limits.conf for, but guys from PHP obviously don't agree with that... I've even saw comments on the list telling "who needs more than 1024 FDs in php process"...

Problem is actually pretty simple to observe - if you have a high number of vhosts in apache + mod_php installation, and each vhosts uses two FDs (error_log and access_log) => with ~500 vhosts FD limit isn't 1024 any more, but only 24 usable FDs are left to php - I would argue even less because apache uses some of them for other things too...

In that case, PHP fails silently, like explained here:

http://serverfault.com/questions/633216/apache-stops-communicating-with-memcache-after-creating-too-many-vhosts/648526#648526


Thoughts, comments?


Follow ups