My favorites | Sign in
Project Logo
       
New issue | Search
for
| Advanced search | Search tips
Issue 757: 502 response occurs frequently on /friendships/show when target account has many followers
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  vernix
Closed:  Jun 29
Type-Defect
Priority-Medium
Component-REST


Sign in to add a comment
 
Reported by craig.hockenberry, Jun 26, 2009
What's the problem you're seeing?

Love the new relationship object that's returned by /friendships/show, but it appears to return a 
lot of 502 gateway errors when making a request with a target user who has a lot of followers. 
For example, @twitter and @aplusk can return a 200 response, but it's rare. You're much more 
likely to see a 502 response.

When calling this API method with a target user that doesn't have a lot of followers, I have yet to 
see a 502 response.

What was the request you made (if applicable)?  Be sure to obscure your
Basic Auth headers.

http://twitter.com/friendships/show.json?
source_screen_name=chockenberry&target_screen_name=twitter

http://twitter.com/friendships/show.json?
source_screen_name=chockenberry&target_screen_name=aplusk

What was the full HTTP response, with headers (if applicable)

HTTP/1.1 502 Bad Gateway
Date: Fri, 26 Jun 2009 19:23:56 GMT
Server: Apache
Last-Modified: Wed, 13 May 2009 19:31:16 GMT
Accept-Ranges: bytes
Content-Length: 4469
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=UTF-8

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
  	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  	<meta http-equiv="Content-Language" content="en-us" />
  	<title>Twitter / Over capacity</title>
  	<link rel="icon" href="http://static.twitter.com/favicon.ico" type="image/ico" />
  	<style type="text/css">
    body{background:#9AE4E8 url(http://static.twitter.com/images/bg.gif) no-repeat fixed left 
top;color:#333;font:0.75em Helvetica,Arial,sans-serif;text-align:center}
    #container { width: 755px; margin: 0 auto; padding: 0px 0; text-align: left; position: relative; }
    #content { width: 100%; margin-top: 0px; float: left; padding-bottom: 15px; background: 
transparent url(http://static.twitter.com/images/arr2.gif) no-repeat scroll 25px 0px;}
    .subpage #content .wrapper { background-color: #fff; padding: 20px 10px 15px 10px; -moz-
border-radius: 5px;-webkit-border-radius: 5px;}
    .subpage #content h1, .subpage #content h2, .subpage #content h3, .subpage #content h4, 
.subpage #content h5 { margin: 3px 0pt 4px; }
    .subpage #content p { line-height: 1.2; margin: 5px 0; }
    .subpage #content ul { padding-left: 30px; }
    .subpage #content ol, #side ol { padding-left: 30px; }
    a{text-decoration:none;color: #0084b4;}
    #content div.desc { margin: 11px 0px 10px 0px; }
    a img{border:0;}
    ul{list-style:square;padding-left:20px;}

    #navigation { position: absolute; top: 12px; right: 0; padding: 0px 5px 0px 5px; line-height: 
0.5em; text-align: center; }
    #navigation ul { 
      list-style:none
      margin: 0; padding: 0px;
      width: auto; height: 100%;
    }
    #navigation li { display:inline; padding: 0 0 0 5px; } 
    #navigation li:before { content: ' '; padding-right: 0; }
    #navigation li.first:before { content: ''; padding-right: 0; }
    #navigation, #footer { background-color: #fff; -moz-border-radius: 5px;-webkit-border-
radius: 5px;}

    #footer { clear: left; width: 555px; text-align: center; padding: 1px 0; line-height: 1; }
    #footer li { display: inline; padding: 0 0 0 5px; }
    #footer li.first:before { content: ''; padding-right: 0; }

  	</style>
  </head>
  <body>

    <div id="container" class="subpage">
      <div id="navigation">
        <ul>
          <li class="first"><a href="http://twitter.com">Home</a></li>
          <li><a href="http://twitter.com/public_timeline">Public Timeline</a></li>
          <li><a href="http://help.twitter.com">Help</a></li>
        </ul>
      </div>
      <h1 id="header"><a href="http://twitter.com"><img 
src="http://static.twitter.com/images/twitter_logo_s.gif" /></a></h1> 
      <div id="content">
        <div class="desc"></div>
        <div class="wrapper">
          <span style="font-size:1.8em; font-weight:bold">Twitter is over capacity.</span><br />
          <div style="font-size:1.2em;margin-top:2px;color:#b6b6a3">Too many tweets! Please 
wait a moment and try again.</div><br />

          <p style="margin-bottom:10px;text-align:center"><img 
src="http://static.twitter.com/images/whale.png" /></p>
        </div>
      </div>

      <div id="footer" style="width:100%">
        <ul>
          <li class="first">&copy; 2009 Twitter</li>
          <li><a href="/help/aboutus">About Us</a></li>
          <li><a href="/help/contact">Contact</a></li>
          <li><a href="http://blog.twitter.com/">Blog</a></li>
          <li><a href="http://status.twitter.com/">Status</a></li>
          <li><a href="/help/api">API</a></li>
          <li><a href="http://help.twitter.com/">Help</a></li>
          <li><a href="/help/jobs">Jobs</a></li>
          <li><a href="/help/tos">TOS</a></li>
          <li><a href="/help/privacy">Privacy</a></li>
        </ul>
      </div>

    </div>

    <!-- BEGIN google analytics -->
    <script type="text/javascript">
      var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl. : "http://www.");
      document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' 
type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
      var pageTracker = _gat._getTracker("UA-30775-6");
      pageTracker._setDomainName("twitter.com");
      pageTracker._trackPageview('503 Error');
    </script>
    <!-- END google analytics -->

  </body>
</html>


Comment 1 by vernix, Jun 26, 2009
(No comment was entered for this change.)
Status: Accepted
Comment 2 by m...@twitter.com, Jun 29, 2009
(No comment was entered for this change.)
Owner: vernix
Labels: Component-REST
Comment 3 by vernix, Jun 29, 2009
A fix for this is in the deployment pipeline and should be live later today. Thanks for stress testing this new 
feature and working out this kink.
Status: Fixed
Sign in to add a comment

Hosted by Google Code