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

Hi I know virtually nothing about perl but need to solve a problem.

Currently I have a perl board hosted on a 3rd party windows 2000 server. I have no control of the server and it seems the timeout settings have been changed and now the board times out. I have found that when running VB scripts on this server I can dynamically change the timeout using:-

Server.ScriptTimeout = numberofseconds

Issue is can I do the same thing in the perl scripts, either directly or by invoking some vb script? Any help that cab offered this complete perl novice would be welcome.

Replies are listed 'Best First'.
Re: server timeout
by caedes (Pilgrim) on Mar 03, 2003 at 12:16 UTC
    When I have a webpage that need to do a long calculation and I don't want the server to timeout the process I use 'fork()' to make a new thread to do the work for me. Eg.
    # first part of script # some code if(fork){ output("I'm doing some work, please wait."); exit; } close(STDIN); close(STDERR); # do the rest of the work here

    The above code hasn't been tested but is an example of forking off a new thread.

    -caedes

      Thanks for the suggestion I am not sure where I would start amending the board code to achieve this however. My skill in writing code are only very basic and in perl nil.
Re: server timeout
by perrin (Chancellor) on Mar 03, 2003 at 17:37 UTC
    This timeout has nothing to do with Perl. It's something that your web server is doing. You need to ask the admins of this server what they did. Perl does not impose any kind of timeout on CGI scripts.
      Thanks for the input, however I realise this, I have no control over the server. As mentioned before I can adjust the timeout via script on ASP pages. What I am trying to find out is whether it is possible to do the same via perl. I appreciate that there is no mechanism in perl allowing direct manipulation of this server parameter. Hence my query as to whether it is possible to run a piece of VB os JS to do this.

      Believe me if it was as simple as getting in touch with the serv admin I would have done it long ago.

        What you're asking about is how to admin an IIS server. This forum has limited expertise on that, since it is not our focus. You should take this question to an IIS support forum, where people are more likely to know the answer to your problem.
Re: server timeout
by Jaap (Curate) on Mar 03, 2003 at 10:49 UTC
    I do not have a direct answer to your question, but would like to know what the current timeout is then and how often 'the board times out'.

    You might try to find out what the vbs actually does internally (the vbs interpreter makes some call to the webserver) and work on that.
      Thanks for replying.

      As far as the first part is concerned:-

      I have measured the timeout at 9 seconds the bord times out 100% of the time on certain processes.

      As far as the second - I'm not sure where to start with that.