Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Perl and memory usage. Can it be released?

by sundialsvc4 (Abbot)
on Feb 07, 2014 at 17:49 UTC ( #1073907=note: print w/replies, xml ) Need Help??

in reply to Perl and memory usage. Can it be released?

Well, this absolutely qualifies as a hack, but I know that it is a hack that is sometimes used ... and useful.   After the process has run through some number of requests, let it choose to commit suicide.   Then, ensure that some init-like process will recognize its death and immediately re-spawn it.   Exactly as is done sometimes with FastCGI, or even with mod_perl, especially when the app in question is oldy-moldy.   You make no attempt to re-engineer how the app goes about its business, having established that it still seems to work.   You simply modify it to, every now and again, put itself to death.   (Which is n-o-t the same as killing it!)

Of course, it is also possible to run it by means of a do-nothing “babysitter” process that launches the other process as a child, waits for it to die, and then takes care of re-launching it ... forever.

Hack.   Wart.   Inelegant.   Smells bad.   Quick.   Works.   Done.

  • Comment on Re: Perl and memory usage. Can it be released?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1073907]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2018-04-23 21:47 GMT
Find Nodes?
    Voting Booth?