I have this code in a script:
} elseif { [var exists $cookie] } {
if { $cookie == $anothervar } {
set match=1
}
It's pseudo code, ok? No need to be very precise here. Anyway, I KNOW that var $cookie exists, so I thought I'd make the code shorter:
} elseif { $cookie == $anothervar } {
set match=1
}
That code handles a form. Using the shorter code, the browser hangs. After a few seconds, I get the black Hiawatha SERVER ERROR page, which is strange for two reasons:
1) I thought I had told Hiawatha to use my custom 500 page. Hiawatha uses my custom 404 page, but it never uses my custom 500 page. It always uses the default, black huge letters Hiawatha 500 page. It's pretty adamant about that.
2) My code is fine. There is no reason for it to hang. But the error.log tells me:
127.0.0.1
/home/www/domain-1.net/index.cgi
CGI timeout
Of course, I second guessed myself. I must have done something stupid, I thought. But after 50 minutes of all kinds of debugging, I decided to point my finger at Hiawatha: I turned it off and launched Apache. Guess what: my code now works.
I have sent you my Hiawatha configuration file in private. I haven't changed anything in it since. What is causing this timeout? I have tweaked all numbers I could think of and didn't find a solution.
TIA
Hiawatha version: 6.16
Operating System: Linux
Hugo Leisink
1 August 2009, 19:29
1) A 500 error can't be catched with the ErrorHandler. Check the Hiawatha manual page for all the catchable error codes.
2) Try settings TimeForCGI to a high number, like 15 seconds for example. Don't use FastCGI and retry again. After requesting the page, immediately run a 'ps' on the machine where Hiawatha runs. If the CGI process shows up as a child of Hiawatha, it's still running. If that's the case, there is something wrong with your code. If you send it to me, I can help you debug it.
This topic has been closed.