CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
cgi timeout

 



daveh71
stranger

Apr 16, 2001, 12:45 PM

Post #1 of 5 (444 views)
cgi timeout Can't Post

I'm pulling my hair out here...and i pray someone can help.
I'm using cgi and dbi mods, and have a nice little web app. My problem is that occassionaly, i will change some code, and for some reason the script hangs, and the perl.exe just sits on the server until eventually i get a cgi timeout error in the browser. The reason it's so annoying, is that I can't get a grasp on what causes it. For example, At the top of one of the files that I have included in my main script there is a function (sub) that isn't being used anywhere. If I take this function out, the script hangs. A few times if I change a line that looks like so:

print <<"HERE";
<td>$nextid</td></tr>
HERE

and i change it to:

print "<td>$nextid</td></tr>";

it will correct the problem.

the strangest thing about the problems, is if i run the script command line, it works fine.

I appologize for the rambeling and non-specific question. If there are any tricks or tips that someone can offer to help me debuggin this I'd appreciate it.

David



(This post was edited by daveh71 on Apr 16, 2001, 12:15 PM)


localfilmmaker
stranger

Apr 17, 2001, 11:52 AM

Post #2 of 5 (435 views)
Re: cgi timeout [In reply to] Can't Post

What web server are you running? And on what operating system? Have you checked the web server logs for any indication of what's going on?

-localfilmmaker
Spencer Christensen
spencer@mecworks.com


daveh71
stranger

Apr 17, 2001, 12:03 PM

Post #3 of 5 (434 views)
Re: cgi timeout [In reply to] Can't Post

webserver is iis
on an nt box.
i can't get any log reports to be generated....



localfilmmaker
stranger

Apr 18, 2001, 11:47 AM

Post #4 of 5 (425 views)
Re: cgi timeout [In reply to] Can't Post

Well, I'm not very familiar with IIS or NT. But on a linux platform, a hanging cgi script could mean permission problems for the web server to access the scripts, or a buffer problem between the script and the web server.
I don't know if permissions are an issue with IIS and NT, but you would know more about that than me. As for buffer problems, make sure that $| = 1; is at the beginning of your script to flush out your output buffer. This usually isn't needed, but it can help.
Are you testing the script from the command-line with actual parameters that would have been passed from the browser? This may help identify sections of your script that are causing the problem.

-localfilmmaker
Spencer Christensen
spencer@mecworks.com


Zeke D
Deleted

Apr 19, 2001, 11:34 AM

Post #5 of 5 (418 views)
Re: cgi timeout [In reply to] Can't Post

Will this also help preventing zombie strings? I have a script that has to wait for the server timeout to kill it. if I were to use $|=1, would it kill the previous thread?

In Reply To
I don't know if permissions are an issue with IIS and NT, but you would know more about that than me. As for buffer problems, make sure that $| = 1; is at the beginning of your script to flush out your output buffer.



 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives