Re: Too many open files

From: Date: Sun, 05 Apr 2009 17:14:57 +0000
Subject: Re: Too many open files
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-291100@lists.php.net to get a copy of this message
On Sun, Apr 5, 2009 at 12:57, Larry Garfield <larry@garfieldtech.com> wrote: > > I know PHP has a max-files-open limit somewhere.  Is that per process, per > user, or per server?  Is this even something I can address myself in my app, > or does it indicate that the server itself is getting over-busy and I have to > just beg my web host for a less busy server?  Any other thoughts as to how to > respond? Is your PHP suExec'd through Apache? Also, you (or, since you're on a shared server, your admin) should check the output from ulimit -a. Most likely, it's set too low (perhaps to the default 256) and someone else on the server is opening multiple files simultaneously, an influx in customers is collectively exceeding the limit, or someone's not closing their file handles. In such a case, the admin should edit /etc/system and up the limits on 'rlim_fd_cur' and 'rlim_fd_max.' Just warn them to watch what numbers they use, and not to go over 1024. This is kernel tuning, so once the changes have been made, the server needs to reboot (power cycle, not an Apache reload) for them to take effect. -- </Daniel P. Brown> daniel.brown@parasane.net || danbrown@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW10000

« previous php.general (#291100) next »