On Fri, 9 Nov 2007, Jonathan Swartz wrote:
> My main worry is number of open file handles. Especially with
> mod_perl, since a lot of those handles will be opened individually in
> the child processes. At the same time, I don't want to have to open
> and close each handle every time. Any idea what kind of limits on
> number of open handles I can expect to hit on a reasonable Unix
> system?
Depends. The easiest way to find out is this one:
#!/usr/bin/perl -w
use strict;
my @handles;
my $count;
while(1) {
open my $fh, "</etc/passwd" or die "died at $count";
push @handles, $fh;
$count++;
}
prints
died at 1020 at ./t line 7.
so that's it :). I would suggest that you find a compromise between
good performance and not running out of file handles by having the
appender maintain a configurable pool of file handles that it keeps open.
-- Mike
Mike Schilli
[EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
log4perl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/log4perl-devel