Bill;

About the 12th line down in your debug it says "HTTP/1.1 503 Service Unavailable". HTTPAPI would return 503 as the error code, in this case.

I would look up http 503 at the W3C site to verify the meaning of the 503 code then, change the program to handle it appropriately.

Assuming that 503 is really "Service Unavailable" I would retry the request in 60 seconds or so. I would also put a progressive delay so that I am not hammering the site. In other words, the first time it fails with 503 I would wait 60 seconds and retry, if it fails with 503 the second time I would wait 5 minutes, if it fails the third time I would wait 15 minutes... until I reached an hours wait time.

Being a "free/open" web service you can expect it to be down/unavailable regularly and without notice. You can code around that but IMHO you don't want to hammer it with requests when it is unavailable. If your paying for the service that's a different story.

Duane Christen


--


Duane Christen
Senior Software Engineer
(319) 790-7162
Duane.Christen@xxxxxxxxxx

Visit PAETEC.COM


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Bill
Sent: Wednesday, September 15, 2010 10:47 AM
To: midrange-l@xxxxxxxxxxxx
Subject: HTTP 503 Service Unavailable - Server is too Busy

We've been running Scott Klement's HTTP utility to grab currency conversion data for a couple of months now. It had been working fine but in the last few weeks, we've been getting errors. This is a V5R2 machine and as far as I know we're not using any other HTTP services.

Problem happened yesterday, I checked then deleted the debug file, reran the program and it worked fine. Today, tried same thing, still an error.

Anyone have any ideas?

Bill


This is what is in the debug file:

recvresp(): entered
HTTP/1.1 100 Continue


SetError() #13: HTTP/1.1 100 Continue
senddoc(): entered
<?xml version="1.0" encoding="iso-8859-1"
standalone="no"?><SOAP:Envelope
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:tns="http://www.webserviceX.NET/";><SOAP:Body>
<tns:ConversionRate> <tns:FromCurrency>USD</tns:FromCurrency>
<tns:ToCurrency>AUD</tns:ToCurrency>
</tns:ConversionRate></SOAP:Body></SOAP:Envelope>
recvresp(): entered
HTTP/1.1 503 Service Unavailable
Connection: close
Date: Wed, 15 Sep 2010 15:31:18 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Content-Type: text/html


SetError() #13: HTTP/1.1 503 Service Unavailable recvdoc parms: identity 0
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
<html><body><h1>Server is too busy</h1></body></html>
SetError() #13: HTTP/1.1 503 Service Unavailable
http_close(): entered
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.