Thread: Cgi timeout

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    19
    Rep Power
    0

    Cgi timeout


    I am running Python scripts as cgi with the Apache web server. The scripts are running for a long time (about 10 minutes), then the result is supposed to be presented. The problem is that there is a time out after 5 minutes and the Python script is not finished.

    I have updated the /etc/httpd/httpd.conf file. I set the Timeout to 6000. After that I restarted the Apache with /etc/init.d/apache restart. The application is still timed out after 5 mintes. I even restared the server, but it did not make any difference.

    What can I do the prevent the timeout?

    Regards,
    Fredrik
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    I don't think Apache will let will let you run a CGI process for long . I believe this is one of the reasons FastCGI was created but dont quote me on that.. in any case FastCGI does allow long running processes.. maybe you'd get a better responce for Question in the Apache form?

    In any case, what are you doing that required a process too run for 10 MINUTES, most don't even run for 10 SECONDS

    Have fun.
    Mark.
    programming language development: www.netytan.com Hula

  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    19
    Rep Power
    0
    Thanks netytan. I already asked the question in the Apache forum with no luck. What is FastCGI? A webserver?

    I am creating a web interface for production tests of one of our products. The web server runs motors among other things. The test cycles are long, up to 10 minutes.
  6. #4
  7. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    FastCGI is an Apache module which as i understand it allows long running CGI processes..

    http://www.fastcgi.com/

    If this doesn't work for you i'd probably suggest you run it from the command line and save the output to a file (as html) and then lauch the file when the process is done

    The web server runs motors among other things
    Sounds interesting, you mean motors on machines etc?

    Mark.
    programming language development: www.netytan.com Hula

  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    19
    Rep Power
    0
    The problem did not have to do with cgi timeout. I let a python script generate the time for 10 minutes. The session kept alive through the script. My mistake! Thank you for your advices!

    I am doing a production test environment for a satellite terminal. So the web server is connected to the terminal and I run motors, modem, amplifier, and read values from compass, gps etc from the web server. It's really interesting work!

    Regards,
    Fredrik
  10. #6
  11. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    def, sounds very cool! and way beond me for once i cant even image how to connect with all those things lol, anyway glad you figured it out

    Mark.
    programming language development: www.netytan.com Hula


IMN logo majestic logo threadwatch logo seochat tools logo