It's a known issue and we are trying to hunt it down. Can you please
provide us with your source IP and an approximate time of when you saw
it?
Thanks, Ryan
DEBUG - urlopen success on http://search.twitter.com/search.json?q=this&rpp=100&geocode=51.51076%2C-0.13126%2C23mi&since_id=3561793228
, code 200
2009-08-26 19:55:01,783 - twittersearch.models - DEBUG - search answer:
2009-08-26 19:55:01,783 - twittersearch.models - CRITICAL - Search did
not reutrn a json object! code = 200 answer = <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd
">^M
2009-08-26 20:10:02,548 - twittersearch.models - DEBUG - urlopen
success on http://search.twitter.com/search.json?q=this&rpp=100&geocode=51.51076%2C-0.13126%2C23mi&since_id=3561793228
, code 200
2009-08-26 20:10:02,548 - twittersearch.models - DEBUG - search
answer: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd
">^M
2009-08-26 20:25:02,439 - twittersearch.models - DEBUG - urlopen
success on http://search.twitter.com/search.json?q=this&rpp=100&geocode=51.51076%2C-0.13126%2C23mi&since_id=3561793228
, code 200
2009-08-26 20:25:02,439 - twittersearch.models - DEBUG - search
answer: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd
">^M
2009-08-26 20:25:02,439 - twittersearch.models - CRITICAL - Search did
not reutrn a json object! code = 200 answer = <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.or
2009-08-26 20:40:07,334 - twittersearch.models - DEBUG - urlopen
success on http://search.twitter.com/search.json?q=this&rpp=100&geocode=51.51076%2C-0.13126%2C23mi&since_id=3561793228
, code 200
2009-08-26 20:40:07,334 - twittersearch.models - DEBUG - search
answer: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd
">^M
2009-08-26 20:40:07,334 - twittersearch.models - CRITICAL - Search did
not reutrn a json object! code = 200 answer = <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.or
The response is always:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd
">
<!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> -->
<HTML>
<HEAD>
<META HTTP-EQUIV="Refresh" CONTENT="0.1">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<TITLE></TITLE>
</HEAD>
<BODY><P></BODY>
</HTML>
2009-09-07 11:19:48,014 - twittersearch.models - CRITICAL - Search did
not reutrn a json object! code = 200 answer = <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd
">
<!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> -->
<HTML>
<HEAD>
<META HTTP-EQUIV="Refresh" CONTENT="0.1">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<TITLE></TITLE>
</HEAD>
<BODY><P></BODY>
</HTML>
Starting to wonder whether this is connected to auth/user agent.
we are most certainly working on it.
the best way to mitigate the error case is to actually do what the
response tells you to do -- in all cases that i've seen the "http 200
error", there has been a refresh header ("Refresh: 0.1"). simply obey
the header, make a subsequent request in 0.1 seconds, and more likely
than not, you will receive your request. in general, "be strict in
what you send out, and be lenient in what you accept" is a pretty good
philosophy to follow. an additional strategy to try: if you receive
an error, then try again with some form of exponential back-off.
if you do see the error, please either send me, personally, a tcpdump
of the issue, or attach it to the issue on http://code.google.com/p/twitter-api/issues/detail?id=1024
.
thanks!
--
Raffi Krikorian
Twitter Platform Team
ra...@twitter.com | @raffi
However, PLEASE, PLEASE, PLEASE, do NOT use linear backoff, i.e.,
subsequent retries are delayed by an amount of time chosen uniformly at
random up to the same maximum amount for each retry. This will lead to
disasters for all API users as failed API requests, when retried, will
tend to bunch up in ever increasing bunches, leading to a higher, not
lower, failure rate.
You should instead use exponential backoff, where the maximum amount of
delay time increases for each retry. Queuing theory and experience
indicate that the optimum factor used to increase the maximum delay for
each retry should be 2.0.
The earliest implementations of both Ethernet and TCP, and I'm sure
other protocols, tried linear backoff and experienced this problem in
spades. When the backoff was changed to exponential, the problems
miraculously went away.
Jim Renkel
_twitter_sess=BAh7CDoRdHJhbnNfcHJvbXB0MDoHaWQiJWU5OGQyZmU3NWVkY2RhZjhkYT
k5% 250ANTBlNTA4OTk0MzhhIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFz
> >
%250AaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--66931156c75554797fc576876bdec52dc