Thanks Axel.  This very well could be my problem.

When I run ulimit -Hn and ulimit -Sn, the system shows I can have 1024 open
handles.  Does that mean if I run lsof | fgrep httpd | wc -l and it is close to 1024,
I have a problem?

Brian


Axel Beckert wrote:

> Hi!
>
> On Wed, Feb 06, 2002 at 10:50:26AM -0500, Brian Burke wrote:
> > I have a server that is up and running, taking about 50k-100k hits a
> > day. For the most part, it is working fine. About every 2-3 weeks, I
> > start getting a lot of messages like this in my error_log:
> >
> > [19498]ERR:  30: Line 1: Not found /valid/path/to/some/file.html
> >
> > If I restart apache, these errors go away, at least for a while.
> >
> > Any ideas as to what could be causing this?
>
> On Wed, Feb 06, 2002 at 10:01:05AM -0600, erik wrote:
> > <AOL>me too.</AOL>
>
> I had this problem, too. It also causes 403s, if some directorys have
> .htaccesses.
>
> The basic problem is 'ulimit -Sn', the number of allowed file handles
> per process. On Solaris (where I had that problem, it defaults to 64,
> which is IMHO quite small.)
>
> If set this higher, it may solve the problem. But beware that some
> software isn't written for filehandles being higher that 256 or 1024.
>
> For more details on that issue see
> http://www.rational.com/technotes/clearcase_html/ClearCase_html/technote_344.html.
>
> If it doesn't solve the problem, look through the use PERL code for
> unclosed file handles. It doesn't need to be your code, which is
> wrong, but some other PERL-Module, you're using.
>
> E.g. in my case the trouble maker was File::MMagic. The problem was
> solved, when I rewrote my code, so that 'new File::MMagic' was used
> once per embperl page and not once per request:
>
> [! use File::MMagic;
>    $CLEANUP{mime_magic} = 0;
>    $mime_magic = new File::MMagic('/opt/local/apache/conf/magic'); !]
>
> > Except that I don't have to wait weeks under serious load.
>
> Before setting up the ulimit I got this after a few hours, that's right.
>
> > I get it on my dev box. But very sporadically. Hitting reload on my
> > browser usually clears it, if not 'apachectl restart' does.
>
> Hitting reload clears it, if the persisent connection from your
> browser is closed and the new connection is established to a new
> child, which probably hadn't that many file handles than that one
> before.
>
> P.S.: In this case it probably would be interesting to know about your
> operating system, 'ulimit -Sn' and 'ulimit -Hn'.
>
> P.P.S.: This kind of problems are best debugged with something like
> 'lsof | fgrep httpd' (lsof = list open files). For Solaris e.g. you
> get lsof as a package from www.sunfreeware.com, and for Linux it should
> be included in every distribution.
>
>                 Regards, Axel
> --
> Axel Beckert - [EMAIL PROTECTED] - http://abe.home.pages.de/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

--
______________________________________
Brian Burke
[EMAIL PROTECTED]
______________________________________



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to