Handling errors with <fetch>

Post Reply
User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Handling errors with <fetch>

Post by Thunderstone »



Hello,

We're putting an ad banner on our Webinator search form. Ads are
served by a Clickover server. Here's the code I added to the page:

<urlcp timeout 2>
<fetch
"http://www.mediacentral.com:1970/insert ... .Page.Valu
e=SEARCH&ClickOver.ClickWise.Align=RIGHT">
<IF $errnum ne "">
<$ret = "<!-- timeout -->">
</IF>
<send $ret>

This seems to work OK as far as timeouts are concerned. However, we
have started getting a lot of 500 errors at hte browser and Dr
Watsons at the console. These go away when I dike out the ad code, so
I'm pretty sure that's where the problem lies.

Anything obvious I'm doing wrong? The <putmsg> function in my search
script is stock:
<A NAME=putmsg>
<LOOP $errnum $errmsg $errfunc>
<IF $errnum eq 115> <!-- Usage error, probably bad query -->
<B>Warning:</B> $errmsg <P>
<ELSE>
<send "<!-- "> $errline: $errnum $errmsg in the function
$errfunc <send "-->">

</IF>
</LOOP>
</A>

-- any help appreciated!

-- Wade Leftwich


Wade Leftwich <wade@demographics.com>
American Demographics / Marketing Tools, a division of Cowles Business Media
tel 607-273-6343 fax 607-273-3196 http://www.demographics.com/



User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Handling errors with <fetch>

Post by Thunderstone »




Looks ok to me. In fact I tried it on 2 different systems (NT and Linux)
with no problems. I assume the errors are occuring on the web server
machine, not the ad server (or are they the same machine?).
Check your web server's error logs to see what is causing the "500" errors.


User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Handling errors with <fetch>

Post by Thunderstone »





I added the <fetch> snippet yesterday. Everything seemed to be OK
while traffic was light. Perhaps some combination of load on our
server and traffic on the Internet?

Our server is a Pentium with 32 megs of RAM, running Windows NT 4.0
SP3. We use O'Reilly Website Pro 1.1. During a business day Webinator
gets about 100 page requests an hour.

The ad server (www.mediacentral.com) is on a remote site, and our
connection to the Internet is just 56K.

Here's what <putmsg> put on the page one time when the fetch timed
out:

<!-- 70: 6 Connection to www.mediacentral.com:1970 timed out in
the function htbuf_flush -->

Regarding what the error log has to say about the 500 errors,
about half the time it's
Couldn't find CGI output from "D:/domains/adi/cgi-bin/texis.exe"
and half the time it's
Empty output from CGI program D:/domains/adi/cgi-bin/texis.exe

When the 500 errors were really piling up we started getting Dr
Watson errors and "low on virtual memory" warnings. Is this due to
having a whole bunch of texis.exe processes hanging?









Wade Leftwich <wade@demographics.com>
American Demographics / Marketing Tools, a division of Cowles Business Media
tel 607-273-6343 fax 607-273-3196 http://www.demographics.com/



User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Handling errors with <fetch>

Post by Thunderstone »



Leftwich, Wade said:

It probably is due to running low on memory. 32M is fairly minimal for
an NT server, especially if you want it to do any real work. If you are
swapping or paging then you should consider adding more physical memory.
Anytime you start swapping you are adding delays to the system, which
will increase the number of overlapping requests causing even more delays,
until you run out of memory. You are seeing the results of the system not
being able to get enough memory to continue running in a normal manner.


Post Reply