Yes, I am also having x-ratelimit not show up after I have received
"OK: 200" errors.

I believe this is due to timeout issues.

Specifically, I often find that I am returned partial JSON (lack of
closing syntax) without the ratelimit header, e.g.:

'_rc' => 200,
'_headers' => bless( {
'connection' => 'close',
'cache-control' => 'max-age=60, must-revalidate, max-age=300',
'status' => '200 OK',
'date' => 'Mon, 10 Aug 2009 23:47:29 GMT',
'vary' => 'Accept-Encoding',
'client-peer' => '168.143.162.123:80',
'age' => '0',
'client-date' => 'Mon, 10 Aug 2009 23:47:21 GMT',
'x-died' => 'read failed: Connection reset by peer at /usr/local/lib/
perl5/site_perl/5.8.8/LWP/Protocol/http.pm line 382.',
'content-type' => 'application/json; charset=utf-8',
'x-cache-svr' => 'c091.twitter.com',
'server' => 'hi',
'x-timeline-cache-hit' => 'Miss',
'x-served-by' => 'c091.twitter.com',
'client-response-num' => 1,
'content-length' => '43452',
'client-aborted' => 'die',
'via' => '1.1 varnish',
'x-cache' => 'MISS',
'x-served-from' => 'b032',
'expires' => 'Mon, 10 Aug 2009 23:52:28 GMT'
}, 'HTTP::Headers' ),
'_msg' => 'OK',



On Aug 10, 11:40 am, Ryan Sarver <rsar...@twitter.com> wrote:
> Thanks Dewald. Generally speaking if you see a 502/503 you should do a
> geometric back off instead of just immediately re-requesting.
> Is anyone else seeing the X-RateLimit header not showing up some times?
>
> Thanks, Ryan
>
> On Mon, Aug 10, 2009 at 8:35 AM, Dewald Pretorius <dpr...@gmail.com> wrote:
>
> > Ryan,
>
> > The 502s don't really bother me. It just slows me down a bit. My
> > Twitter lib automatically retries a request that 502'd.
>
> > The 200 OK responses that come back with the X-RateLimit headers
> > missing happen on all kinds of requests, both GETs and POSTs (more on
> > GETs as far as I can tell), and as far as I can see there is no
> > pattern. One request would return headers, and the very next request
> > to the same API method would not return the headers. Are these perhaps
> > requests have have been 302'd? I can't really check because cURL is
> > following the redirects on GETs.
>
> > Dewald
>
> > On Aug 10, 12:19 pm, Ryan Sarver <rsar...@twitter.com> wrote:
> > > Can you all provide full packet dumps of the issues you are seeing? That
> > > will help us debug the type of request you are making and what the full
> > > response looks like.
> > > Thanks, Ryan
>
> > > On Mon, Aug 10, 2009 at 8:15 AM, Duane Roelands <
> > duane.roela...@gmail.com>wrote:
>
> > > > My users are seeing these as well.
>
> > > > On Aug 10, 10:22 am, Dewald Pretorius <dpr...@gmail.com> wrote:
> > > > > Just to let you guys know that 502 Bad Gateway responses are coming
> > > > > thick and fast this morning (Monday).
>
> > > > > Dewald
>
>

Reply via email to