Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Apache reloads

by ksublondie (Friar)
on Dec 21, 2018 at 18:56 UTC ( [id://1227576]=perlquestion: print w/replies, xml ) Need Help??

ksublondie has asked for the wisdom of the Perl Monks concerning the following question:

This is probably the wrong place to ask the question, but I'm hoping someone can point me in the right direction.

My perl (v 5.24) intranet site (approx. 175 users) is running apache2 on Debian. Every few weeks, the perl borks out but is fine after reloading apache. The apache error log gives the error:

[:error] [pid 33013:tid 139730578532096] Attempt to reload IO/Handle.p +m aborted.\n Compilation failed in require at /usr/local/lib/x86_64-linux-gnu/perl/ +5.24.1/IO/Socket.pm line 12.\n BEGIN failed--compilation aborted at /usr/local/lib/x86_64-linux-gnu/p +erl/5.24.1/IO/Socket.pm line 12.\n Compilation failed in require at /usr/local/share/perl/5.24.1/Net/LDAP +.pm line 9.\n BEGIN failed--compilation aborted at /usr/local/share/perl/5.24.1/Net/ +LDAP.pm line 9.\n Compilation failed in require at /var/www/html/perl/modules/Intranet/D +ocTracker.pm line 5.\n BEGIN failed--compilation aborted at /var/www/html/perl/modules/Intran +et/DocTracker.pm line 5.\n Compilation failed in require at /usr/share/perl/5.24/base.pm line 136 +.\n \t...propagated at /usr/share/perl/5.24/base.pm line 158.\n BEGIN failed--compilation aborted at /var/www/html/perl/intranet/user/ +doctracker.pl line 8.\n
The filenames change, but it's always the same basic error message. Reloading apache smacks the server back into line and everything is rosy again. ....Until a few weeks later when this happens again. I currently have 11+G of memory. Apache was using 3.xxG before restarting it this morning when it went down to 1.75G.

Any ideas why perl is failing?

Replies are listed 'Best First'.
Re: Apache reloads
by stevieb (Canon) on Dec 21, 2018 at 19:28 UTC

    I've seen that before when you've got a circular dependency when loading your Perl modules.

    Look through all of your own code, and make sure that you haven't got a situation where one module is loading another module that in turn loads the original module again.

      Oooooo....that sounds highly probable!

      Looking...

Re: Apache reloads
by kschwab (Vicar) on Dec 21, 2018 at 20:59 UTC

    Hard to tell with just this info. You could, for example, be leaking file descriptors and hit the open file limit. It might be helpful to try something like this to get more info:

    # wrap the call that's bombing eval { require ModuleThatsFailing; }; my $err = $@; if ($err){ # add whatever other debugging/info you want die("err: [$err] errno [$!]"); }
Re: Apache reloads ( Attempt to reload IO/Handle.pm aborted )
by Anonymous Monk on Dec 21, 2018 at 23:36 UTC

    Hi

    Is this a system perl?

    Any modules updated/reinstalled before apache was restarted?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1227576]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-03-28 17:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found