My Perl web-app, running under Apache mod_fastcgi, frequently gets errors like the following:
Maximal count of pending signals (120) exceeded at line 119.
I've seen this happen in relation to file uploads but I'm not sure that's the only time it happens. I also get a SIGPIPE right before (or possibly after) I get that error.
Any thoughts?
EDIT Thanks for the suggestions everyone. Someone asked what line 119 was. Sorry, should have put that in. It's in a block of code where I run the virus checker on an uploaded file. I don't get the error every time, only occasionally.
if(open VIRUS_CK, '|/usr/local/bin/clamscan - --no-summary >'.$tmp_file) {
print VIRUS_CK $data; // THIS IS LINE 119
close VIRUS_CK;
if (($? >> 8) == 1) {
open VIRUS_OUTPUT, '<'.$tmp_file;
my $vout = <VIRUS_OUTPUT>;
close VIRUS_OUTPUT;
$vout =~ s/^stdin:\s//;
$vout =~ s/FOUND$//;
print STDERR "virus found on upload: $vout\n";
return undef, 'could not accept attachment, virus found: '.$vout;
}
unlink($tmp_file);
}