What does “Maximum Waiting Signals (120) Exceed“ Medium ”?

In my Perl web application running under Apache mod_fastcgi, errors often appear, such as the following:

The maximum number of pending signals (120) is exceeded on line 119.

I have seen this happening in relation to file uploads, but I'm not sure if this is the only time this happens. I also get SIGPIPE right before (or maybe after), I get this error.

Any thoughts?

EDIT Thanks for all the suggestions. Someone asked what a line is. Sorry had to put this in. This is in the code block where I run the virus scan in the downloaded file. I do not get an 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); } 
+7
perl fastcgi mod-fastcgi
source share
2 answers

This means that the operating system delivers signals to Perl faster than it can handle them, and the saturation point is reached. Between operations, Perl saves the signals that are processed, and then processes them as soon as it has a chance. You get this error because too many signals were received before Perl had the chance to take a breath. This is a fatal error, so your Perl process exits.

The solution is to figure out what generates so many signals. See here for more details.


Update: My initial answer was somewhat inaccurate, saying that creating a new Perl process was part of the problem when it really wasn't. I updated based on @ysth comment below.

+7
source share

I will be manual because I have not used mod_fastcgi for a long time, and some time has passed since I looked at its documentation.

I assume that your Perl module is not forking, but it takes some time to start, so the client closes the processing time. See the Notes in the FastCGI Apache mod_fastcgi module for signals used by FastCGI and how programs can process these signals, including SIGPIPE .

+2
source share

All Articles