Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Perl problem on Win32

by gellyfish (Monsignor)
on Nov 02, 2004 at 11:09 UTC ( #404562=note: print w/replies, xml ) Need Help??


in reply to Re: Perl problem on Win32
in thread Win32 Hosting companies not supporting Perl

I totally agree with the response from ActiveState: there is nothing stopping you making a patch that implements this and sending it to p5p - this is likely to be far more productive than moaning about it here. I also think that asserting that you make money from selling applications written in Perl and then essentially demanding that someone do something for free to help you make more money is at best tasteless.

As to your original suggestion I personally find it entirely without merit, firstly it assumes that all Perl programs are run under the CGI and need only to run for a short time, this is patently untrue. Secondly what you are describing is not a bug in Perl, but a failure on the part of the server administrators combined with the differences between Windows and Unix. IIS has configuration for Processor Throttling (a limit on the amount of time a process can take on the processor) and Script Timeout - it is the responsibility of the administrator to ensure that these are set appropriately for the kind of use that the server will be put to. It might also be noted that the alarm() function is not implemented on Windows, so this would also need to be remedied before implementing your suggestion (Okay, I discover that it is implemented with 5.8.4.) I would suggest that, if the IIS configuration is not sufficient to your needs, you (or the server administrator) should create a small wrapper program that can control the execution of the CGI program.

/J\

Replies are listed 'Best First'.
Re^3: Perl problem on Win32
by cosmicperl (Chaplain) on Nov 02, 2004 at 15:30 UTC
    The fact that for certain infinite loops, such as the one created from the same script I've given in a commented post below, prevent you from ending the process (this only occurs on Win32, the same script under Linux can be killed), I hold ActiveState responcible. I assume (correct me if I'm wrong) that this would be something to do with the compilation on WinDose. Yes it's probably to do with some stupid way windose handles processes, but again that doesn't stop the problem from existing and a work around being required.

    If trying to get more Win32 hosting companies to install perl is a crime then I'm guity as charged. If trying to increase perls popularity is a crime then I'm guilty as charged. If listening to the only reason why more win32 hosting companies haven't installed Perl, and opening a discussion on it to find out what steps I need to take to get the problem resolved is a crime then I'm guilty as charged. If you don't think that this is good merit then what would you prefer? Me to start a campaign to stop people from using perl?
    The bottom line is that if more win32 hosting companies are supporting perl then the whole perl community and Perl itself will benefit. The language can retake it's well deserved place as the internets most popular cgi scripting language.

    "firstly it assumes that all Perl programs are run under the CGI and need only to run for a short time" - Please point out EXACTLY where ANY of my statements make this assumption. I don't take kindly to people putting plain stupid words in my mouth that I never said, so that they can try to have a pop. I spend my whole day working with perl, it's my livelyhood, not a hobby. And your tell me that some perl operations are not short, and not CGI. Really, no s**t, do you want a medal?
    "Secondly what you are describing is not a bug in Perl" - Now if you look all of my comments, you'll clearly see that I AT NO POINT state that this is a BUG in Perl. I say that this is a PROBLEM when perl is running CGI scripts.
    "failure on the part of the server administrators" So what are you saying. A administrator with more than 200 accounts on his server should manually vet, test and approve all CGI scripts that get uploaded to the server by a user? Plain ridiculous.
    "and Script Timeout" Useful if the user doesn't hit his browsers stop button for the full default 5 minutes. Otherwise this will not kill the process. Same goes for apache on Win32 and Linux.
    "you should create a small wrapper program" Finally a good point. Yes I've already been asking ActiveState about the possibility for creating this. My searches on google didn't return any methods. I get the feeling the wrapper would need to be in C++ where I don't have much experience. Then you've got the problem of informing every Win32 host about the wrapper, unless I could convince ActiveState to include it with their release.

    Perl knows when it's being calls from a web server be it apache or IIS, the timeout would only need apply in this case. Seemed to obvious to post, but I guess some people need to be told.

      The fact that for certain infinite loops, such as the one created from the same script I've given in a commented post below, prevent you from ending the process (this only occurs on Win32, the same script under Linux can be killed), I hold ActiveState responcible.

      This is an entirely incorrect supposition and one that could be tested by running a similarly malfunctioning CGI program written in any other language of your choice.

      "firstly it assumes that all Perl programs are run under the CGI and need only to run for a short time" - Please point out EXACTLY where ANY of my statements make this assumption.

      It is implicit in the assertion that some 'PerlTimeOut' configuration (with a default value of 60 seconds nonetheless) should be introduced into Perl, when you yourself state that the problem only occurs when running Perl CGI programs under IIS.

      "failure on the part of the server administrators" So what are you saying. A administrator with more than 200 accounts on his server should manually vet, test and approve all CGI scripts that get uploaded to the server by a user? Plain ridiculous.

      You obviously failed to read or understand the sentence where I said "it is the responsibility of the administrator to ensure that ( the IIS configuration is) set appropriately for the kind of use that the server will be put to" Couldn't be clearer. If the systems administrators of a hosting company are not compentent to do this then you are unlikey to want to use that company whether they offer Perl or not.

      Perl knows when it's being calls from a web server be it apache or IIS, the timeout would only need apply in this case. Seemed to obvious to post, but I guess some people need to be told.

      I'm sure when you have worked out precisely how it is that perl 'knows' this then p5p will be more than happy to discuss your patch.

      /J\

      A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2021-09-20 19:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?