cavac has asked for the wisdom of the Perl Monks concerning the following question:
I have an application that uses literally hundreds of modules (plus in turn their dependencies). And it's a forking application, specifically a webserver.
My problem is that sometimes a child will hang with 100% CPU usage during the DESTROY call. What would be the best way to debug this?
Print statements? Setting hundreds of debug points?
Is there any good way to overload DESTROY without loosing the original functions? EDIT: To clarify, automatically adding a print "starting DESTROY in $filename"/"Ending destroy in $filename" to every DESTROY function would help quite a lot.
perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Debugging DESTROY calls in forking application
by LanX (Saint) on Mar 10, 2020 at 11:25 UTC | |
by cavac (Parson) on Mar 10, 2020 at 14:11 UTC | |
by LanX (Saint) on Mar 10, 2020 at 14:20 UTC | |
by cavac (Parson) on Mar 10, 2020 at 14:42 UTC | |
by LanX (Saint) on Mar 10, 2020 at 15:30 UTC | |
Re: Debugging DESTROY calls in forking application
by haukex (Archbishop) on Mar 10, 2020 at 15:28 UTC | |
Re: Debugging DESTROY calls in forking application
by bliako (Monsignor) on Mar 11, 2020 at 12:56 UTC | |
by cavac (Parson) on Mar 13, 2020 at 08:49 UTC | |
by bliako (Monsignor) on Mar 13, 2020 at 10:13 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |
Back to
Seekers of Perl Wisdom