On Mon, 20 May 2002, Casey Allen Shobe wrote: > Since compiling PHP --with-sybase-ct, I get the following errors in the > error_log after several days of webserver uptime: > socket: Too many open files in system > socket: Too many open files in system > socket: Too many open files in system > socket: Too many open files in system > socket: Too many open files in system > > I don't know how to track this down - any help would be appreciated. The > operating system is Linux; the webserver Apache. > > I cannot connect to the database when I start seeing these. Restarting Apache > makes the problem go away for a few days.
If the problem takes a while to appear, you may have a filehandle leak somewhere - something keeps opening files and never closing them. It may or may not have any thing to do with PHP (could be that the sybase driver just uses a few more and makes the problem appear earlier). Some time studies of lsof output could provide clues. The brute force bandaid solution would be to recompile your kernel with lots more filehandles, but that just prolongs the problem (and could lead to other problems, like running out of memory). This is all very general - I know nothing about the sybase drivers, and if anyone does, they should be listened to instead of me. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php