Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^6: a few clarifications

by cosmicperl (Chaplain)
on Nov 04, 2004 at 23:22 UTC ( #405336=note: print w/ replies, xml ) Need Help??


in reply to Re^5: a few clarifications
in thread Win32 Hosting companies not supporting Perl

Apache will not kill the process if it's runaway and the user clicks stop or refresh. The timeout setting is missed. Please give it a try for yourself. Perl keeping control of itself IS the right thing to do. You can't expect every program that calls it to task care of problems in Perl scripts. Giving them a switch so that Perl takes care of itself with more than boost perls reputation to web hosts.


Comment on Re^6: a few clarifications
Re^7: a few clarifications
by Elian (Parson) on Nov 05, 2004 at 03:25 UTC
    Yes, yes it will. Set the RLimitCPU setting and try it. Apache's perfectly happy to kill runaway CGI child processes, as it should, since it's running the show. Doesn't matter of the user clicks a damn thing, the limit is applied regardless, as it ought to be. Servers are ultimately responsible for the maintenance of their children. Thirty seconds with google shows that IIS will also do this if you tell it, again as it should, since it's running the show.

    Putting the limit in perl won't solve this problem. If the admins aren't going to enable the limits in the server they're not going to do it for perl programs, so you get nothing. And, from bitter experience, it's pretty clear that leaving it to the client to enforce time limits doesn't work either. (Since making your code do this now takes all of two lines, and isn't entirely reliable in the face of a number of third party libraries anyway)

    You've got the wrong solution to your problem, and as such it won't solve the problem. Use the right solution, which you already have.

      Thirty seconds with google shows that IIS will also do this if you tell it, again as it should, since it's running the show.
      Care to share this solution with us? I couldn't find anything. Please provide this solution for Win2000 Professional so that the perl process can not runaway. You made the claim now prove it.
      Putting the limit in perl won't solve this problem.
      Frankly it will. If ActiveState decide to add it as an installation option then it'll get used. Really, REALLY, simple. Unlike your IIS solutions you claim exist, but don't actually give links to.
      (Since making your code do this now takes all of two lines, and isn't entirely reliable in the face of a number of third party libraries anyway)
      Care to elaborate?
      Use the right solution, which you already have.
      Do you actually read any of my posts? Do you? It's like talking to someone on long distance who keeps falling asleep, ignoring most of what you say and only hearing what he wants. So your telling me that I already have a solution where anyone who downloads and installs ActivePerl for Win32, by default there system will not be taken down by runaway processes? Umm, wait a minute, apparently the only solution to this is one you know about, but care not to provide, and when I test what you've said will do it so far doesn't do squat all difference on Win200 Professional. Which apparently involves very sepcial configuration in IIS, which only you know about?
        Oh, please, the histrionics aren't amusing any more.

        Thirty seconds with google looking for, say, IIS cpu time limit pulls up plenty of stuff. Like docs for the CGITimeout, CPUCGIEnabled, and CPULimitProcStop properties from Microsoft's knowledge base. Sure looks like IIS does all this already.

        Patching perl won't fix this problem without a damned impressive patch. The ones you've proposed just won't work -- besides being undone by the first alarm set in the process, it won't catch all the cases where things run wild anyway.

        It's possible that I have no clue here how webservers work, haven't been up to my elbows in perl 5's guts on several platforms, haven't been working on perl 6, and aren't the guy who'd have to design the bits that'd be needed to make something like this work in the future. And it's also possible that everbody who's commenting is utterly clueless here.

        Or... not. Sometimes when everyone tells you you're wrong you actually are wrong.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://405336]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2014-11-28 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (196 votes), past polls