mod_php runs out of file descriptors?!

From: Date: Fri, 28 Nov 2014 00:06:38 +0000
Subject: mod_php runs out of file descriptors?!
Groups: php.general 
Request: Send a blank email to php-general+get-324066@lists.php.net to get a copy of this message
Hi guys. I'm running CentOS 6 with latest httpd (2.2.15-31.el6) + mod_php (tried 5.4 and 5.6). I've noticed a very peculiar problem with mod_php. I have a very high number of virtual hosts set up - it's around 501. Problems started occuring after vhost number 493. First 493 vhosts work as expected, but as soon as I add vhost number 494, PHP stops communicating with memcache, and it times out on every read/write access. Actually, I'm using memcache as a backend sessions store, so, php function: session_start(); simply times out after 30 sec. If I delete the random one of the 494 vhosts and restart apache, it starts working again. I've set ulimit really high (65k) but it doesn't help. I've tried switching off ulimits completely, but no luck. Do you guys have any ideas what more could I try? I've tried stracing the httpd process to which I'm connected to, after I hit the enter in browser and after 30 sec wait commences. This is the strace output: select(1170, [1024 1169], [], NULL, {1, 0}) = 2 (in [1024 1169], left {0, 999998}) select(1170, [1024 1169], [], NULL, {1, 0}) = 2 (in [1024 1169], left {0, 999998}) select(1170, [1024 1169], [], NULL, {1, 0}) = 2 (in [1024 1169], left {0, 999998}) select(1170, [1024 1169], [], NULL, {1, 0}) = 2 (in [1024 1169], left {0, 999998}) select(1170, [1024 1169], [], NULL, {1, 0}) = 2 (in [1024 1169], left {0, 999998}) So basically PHP is stuck on select(), and that's it, it repeats the select() system call indefinitely. More info (including GDB output) on: http://serverfault.com/questions/633216/apache-stops-communicating-with-memcache-after-creating-too-many-vhosts Do you have any ideas what can I do to debug the issue further?

« previous php.general (#324066) next »