On a new Ubuntu server, our Apache2 mod_perl2 system randomly fails when more than 8 clients connect. Once it fails, it won't recover -- all further fast-CGI activities fail, and Apache must be restarted. The error is very peculiar: it says there are syntax errors in standard Perl modules that it's trying to reload. Clearly this is wrong since it already loaded them many times before, and these are standard Perl modules.
Here is the Perl stack trace we get:
[Thu Oct 04 18:33:09.222314 2018] [perl:error] [pid 11191:tid 139899223140096] [client 10.100.1.61:38632] failed to resolve handler `Che\
mAxonServer': syntax error at /usr/lib/x86_64-linux-gnu/perl/5.22/IO/Handle.pm line 65, near "croak "usage: $class->new()""
syntax error at /usr/lib/x86_64-linux-gnu/perl/5.22/IO/Handle.pm line 73, near "croak "usage: $class->new_from_fd(FD, MODE)""
syntax error at /usr/lib/x86_64-linux-gnu/perl/5.22/IO/Handle.pm line 99, near "croak "IO::Handle: bad open mode: $mode""
syntax error at /usr/lib/x86_64-linux-gnu/perl/5.22/IO/Handle.pm line 104, near "croak 'usage: $io->fdopen(FD, MODE)'"
syntax error at /usr/lib/x86_64-linux-gnu/perl/5.22/IO/Handle.pm line 123, near "croak 'usage: $io->close()'"
syntax error at /usr/lib/x86_64-linux-gnu/perl/5.22/IO/Handle.pm line 137, near "croak 'usage: $io->opened()'"
syntax error at /usr/lib/x86_64-linux-gnu/perl/5.22/IO/Handle.pm line 142, near "croak 'usage: $io->fileno()'"
syntax error at /usr/lib/x86_64-linux-gnu/perl/5.22/IO/Handle.pm line 147, near "croak 'usage: $io->getc()'"
syntax error at /usr/lib/x86_64-linux-gnu/perl/5.22/IO/Handle.pm line 152, near "croak 'usage: $io->eof()'"
syntax error at /usr/lib/x86_64-linux-gnu/perl/5.22/IO/Handle.pm line 157, near "croak 'usage: $io->print(ARGS)'"
/usr/lib/x86_64-linux-gnu/perl/5.22/IO/Handle.pm has too many errors.
Compilation failed in require at /usr/lib/x86_64-linux-gnu/perl/5.22/IO/Seekable.pm line 9.
BEGIN failed--compilation aborted at /usr/lib/x86_64-linux-gnu/perl/5.22/IO/Seekable.pm line 9.
Compilation failed in require at /usr/lib/x86_64-linux-gnu/perl/5.22/IO/File.pm line 11.
BEGIN failed--compilation aborted at /usr/lib/x86_64-linux-gnu/perl/5.22/IO/File.pm line 11.
Compilation failed in require at /usr/share/perl/5.22/IO/Compress/Base.pm line 11.
BEGIN failed--compilation aborted at /usr/share/perl/5.22/IO/Compress/Base.pm line 11.
Compilation failed in require at /usr/share/perl/5.22/IO/Compress/RawDeflate.pm line 9.
BEGIN failed--compilation aborted at /usr/share/perl/5.22/IO/Compress/RawDeflate.pm line 9.
Compilation failed in require at /usr/share/perl/5.22/IO/Compress/Gzip.pm line 11.
BEGIN failed--compilation aborted at /usr/share/perl/5.22/IO/Compress/Gzip.pm line 11.
Compilation failed in require at /emi/src/trunk/public_html_chemaxon/fcgi/ChemAxonServer.pm line 29.
BEGIN failed--compilation aborted at /emi/src/trunk/public_html_chemaxon/fcgi/ChemAxonServer.pm line 29.
Compilation failed in require at (eval 3) line 2.
Further attempts to use the system result in repeated errors, like this:
[Thu Oct 04 18:33:09.514512 2018] [perl:error] [pid 11191:tid 139899072071424] [client 10.100.1.61:38686] failed to resolve handler `ChemAxonServer': Attempt to reload ChemAxonServer.pm aborted.\nCompilation failed in require at (eval 9) line 2.\n
As far as we can tell, there are no significant differences between the old and new servers:
Ubuntu 14.04 Apache 2.4.18
I can only guess that it's hitting some resource limit, like memory or files, and once that happens it can't recompile the modules, and assumes that compiler's error message is real, when in reality the compiler is hitting a resource limit. But this is just a guess.
Thanks, Craig