in reply to Re: How to debug "Too Many Open Files" Error
in thread How to debug "Too Many Open Files" Error

Thanks so much for your quick response. This is good practice so I appreciate the recommendation. In this application I have had no cause to open any files directly, although I believe Authen::Captcha probably opens some and I use this to generate a session key when a user signs in. Some of the other modules I use may open files as well. Here is the only case I use an OPEN command:
open ( MAIL, "|$sendmail -oi -t" ) or die "Cannot open $sendmail: $!";
But this mail module has not been involved with any of the errors that have emerged. Is there a way to run lsof from inside my PERL script? If not, I can suggest it to my hosting service. Thanks, Tony

Replies are listed 'Best First'.
Re^3: How to debug "Too Many Open Files" Error
by moritz (Cardinal) on Sep 16, 2008 at 22:58 UTC
    You can run external commands from perl (not PERL please, it's not an abbreviation) with either system or qx (the latter might be more useful in your case).
Re^3: How to debug "Too Many Open Files" Error
by kubrat (Scribe) on Sep 17, 2008 at 15:15 UTC

    It is very unlikely that this line is causing the issue because normally opening a pipe does not count towards open files.