Gravatar Properly Syncing Again

I want to apologize for the spotty gravatar syncing that has been occurring over the last two weeks. I’ve finally identified and fixed the bug that was causing the problem and your gravatar selections should propagate correctly now. I will go back and re-sync everyone just to make sure all the failed syncs get done.

The way Gravatar 2.0 deals with serving gravatar images is a multi-step process. When you assign a gravatar to an email address, the system takes your image, creates 80 scaled images from that (from 1×1 to 80×80) and puts them into a directory structure that will allow the gravatar serving lighttpd servers to serve them directly as files. Once the directory structure is created, it is tarred and gzipped to create a single compressed file that represents the images for a specific email address (based on the sha1 of the address). This file is then uploaded to Amazon S3 for distribution to the gravatar serving servers (of which there are 2). In addition, a message is placed on a queue for each server (via Amazon SQS). This completes step 1. On each gravatar serving server there is a process that pops messages off its queue, downloads the stated file from S3, and extracts it into the correct location. It is then available for serving to the internet. This completes step 2.

The problem was that the library I am using to interface with S3 (AWS/S3 in Ruby) had a bit of a quirk that seemed like it should have worked, but didn’t. For the benefit of others, I present the problem code and the solution.

The original, offending code:

AWS::S3::Base.establish_connection!(
:access_key_id     => '***********************',
:secret_access_key => '**************************************'
)

bucket = AWS::S3::Bucket.find('gravatar')
archive = bucket[sha1 + ".tar.gz"]

This code connects to the S3 service, gets the ‘gravatar’ bucket, then grabs the file from it. Simple enough, but misleading. When you get the bucket, only the first 1000 items within it are returned (a byproduct of the Amazon S3 API). Then, when you try to grab your file from the bucket, the file will be returned only if the item was within those 1000 items. This explains why Gravatar worked fine at first, then degraded to where fewer and fewer successful syncs where happening. It’s a devious bug to detect, and the documentation was not forthcoming on why this might be happening.

If you know that the object you’re interested in is in S3 but it can’t be found during a lookup, you’ll want to fetch the item directly, thereby eliminating the problem of a maximum of 1000 returned items. In retrospect, this is obviously the more desirable way to do things.

Here is the fixed code:

AWS::S3::Base.establish_connection!(
:access_key_id     => '***********************',
:secret_access_key => '**************************************'
)

archive = AWS::S3::S3Object.find(sha1 + ".tar.gz", 'gravatar')

So, if your gravatar has not been appearing properly, you can reassign it to your email address and it will propogate now. As I said before, I will push the entire contents of S3 onto the queues to make sure everyone is up to date.

I’m very sorry this problem took so long to fix, and I understand your frustration. I hope you will once again be happily gravataring!

Tom


Subscribe and get notified about the latest Gravatar news…

Join 15.3K other subscribers

Comments

190 responses to “Gravatar Properly Syncing Again”

  1. Benke Avatar

    It works!?

    Like

  2. MissHagrid Avatar
    MissHagrid

    Thanks for the response, Tom. I re-associated my avatar and am seeing if it’s working now.

    Like

  3. Let's see again Avatar
    Let’s see again

    alright then the Blue G YET AGAIN

    Like

  4. Dennis Avatar
    Dennis

    testing

    Like

  5. Let's see Avatar
    Let’s see

    alrighty then

    Like

  6. AntBee Avatar
    AntBee

    Thanks Tom! Mine has been working smoothly since Gravatar 2.0 was launched. I hope this is really the end of the problems so everyone can go on with their lives again.

    Like

  7. Tom Werner Avatar

    The Syncing servers are fixed but still catching up from being down before. I’ll post another comment once they’ve caught up. Looks like I need *another* server.

    Like

  8. Gillian Avatar
    Gillian

    Thanks

    Like

  9. Quinn Avatar
    Quinn

    testing

    Like

  10. Khalidah Avatar

    Thank you Tom for the email and update
    It is working fine now 🙂

    Like

  11. sdvgc Avatar
    sdvgc

    Why is the URL still with .php? And MD5? Shouldn’t there be a new URL?

    Like

  12. Okay Avatar
    Okay

    Thanks for the “catching up comment” becaseu I was wondering

    Like

  13. Thank you!! Avatar
    Thank you!!

    Finally I didn’t want to have to send Bokeem Woodbine to your house!!!

    Like

  14. Lily Avatar
    Lily

    Looking forward to seeing my avatar!

    Like

  15. Afiya Avatar
    Afiya

    Testing

    Like

  16. Lubos Motl Avatar

    Thanks for fixing it, Tom.

    Like

  17. msk01 Avatar
    msk01

    Hope it works now. Just test.

    Like

  18. flix Avatar

    🙂

    Like

  19. Storm Avatar

    Great! Refreshed my WordPress plugin cache and it came straight up. Great job! Thank you for having made a very cool web feature!

    Like

  20. Matthew Buchanan Avatar

    Tom, I’m still seeing an old icon that’s long-since been deleted. Have just tried re-confirming via the admin again. If it works you should see a light bulb.

    Like

  21. patri Avatar
    patri

    .

    Like

  22. Robyn Avatar
    Robyn

    This is a test to see if my Gravatar will finally work.

    Like

  23. Stephen Avatar

    Testing, 1, 2, 3.

    Like

  24. JET Avatar
    JET

    mmmmmmmmmmm…….

    Like

  25. Virgilene Swift Avatar

    Help! My avatar is still not showing up. It is rated “G”. It has a green square around the picture both below the email address and around the address with the picture. The email address matches exactly on the site where I want the avatar. What am I doing wrong? Or is it still slow from the earlier problems???

    Like

  26. Pablo Avatar

    Testing 1,2,3 🙂

    Like

  27. Chris Avatar

    testing 1-2-3

    Like

  28. Dave Avatar
    Dave

    Testing

    Like

  29. Nick Avatar

    Testing testing, 1 2 3 🙂

    Like

  30. xoacas Avatar

    Ok again.

    Like

  31. Alice Avatar

    Testing…

    Like

  32. Alis Avatar

    WHY DAMN MY GRATAVAR DOESN’T WORK AGAIN?

    Like

  33. Katie Avatar

    OMG YAY!!! I am so happy now 😀

    Like

  34. Angi Avatar

    It works! 🙂 Thank you so much Tom!

    Like

  35. Torley Avatar

    C’mon testing testing what will hopefully show up as my NEW gravatar… *awaits*

    Like

  36. Jungkeuny Avatar
    Jungkeuny

    Testing

    Like

  37. powwow Avatar
    powwow

    testing my avatar

    Like

  38. ZappoMan Avatar

    If this works, I will be happy… Tom’s explanation certainly makes sense!

    Like

  39. Kirsten Avatar
    Kirsten

    Like

  40. bluepanjeet Avatar
    bluepanjeet

    testing

    Like

  41. LUCIana Avatar
    LUCIana

    great TOM!!!thanks!!!

    Like

  42. Mindy Avatar
    Mindy

    Test.

    Like

  43. Klaus Seistrup Avatar

    Testing…

    Like

  44. Sly Avatar

    Just checking if it works.

    Like

  45. bennie Avatar
    bennie

    thx for this beautiful lil work!

    Like

  46. p o i s o n e d * Avatar

    Hi there,
    I tried several times to signup for a Gravatar account but every time I get this message :
    «Application error

    Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html»

    Quite frustrating because I would really want to use Gravatar for my comments on my blog !
    I also tried to see if I could get the answer by meself but the Help page seems to be “underway”.

    Thanks for reading this.

    Like

  47. dawnh Avatar

    Still not work!

    Like

  48. takeo Avatar
  49. Sabine Avatar

    My gravatar has stopped showing up in my blog comments (it just shows that blue on white gravatar icon) 😦 Now I’m trying to see if it works here. Let’s see…

    Like

  50. Help Now Avatar
    Help Now

    What is the URL to pre-fill in the e-mail address?

    http://site.gravatar.com/signup?email=test = doesn’t work.
    http://site.gravatar.com/signup?e-mail=test = doesn’t work.
    http://site.gravatar.com/signup?mail=test = doesn’t work.

    Like

  51. campingLisaB Avatar
    campingLisaB

    Testing my gravatar

    Like

  52. marin Avatar
    marin

    testing my gravatar

    Like

  53. Daniel Avatar

    Crop is not working properly with Firefox under Linux. It says it don’t work with my browser and I should try Firefox, even tho I already use Firefox (But on Linux, maybe your browser check is bugged)

    Like

  54. Bernard Doddema Avatar

    Thanks for getting this fixed!!!!

    Like

  55. Alicia Avatar

    Gravatar!

    Like

  56. Benedikt Avatar

    Check, check, 1, 2, 3…

    Like

  57. Corrado Avatar
    Corrado

    Man, it’ll be nice if this works. A bit of ‘customer service’ in the form of an announcement a few weeks ago would’ve been nice.

    Glad it’s (apparently) fixed!

    Like

  58. Lapper Avatar

    Does it work!? Does it work?! Is Tom finally back? Testing…

    Like

  59. aoyoyo Avatar

    Not working at my site.

    Like

  60. Zanthina Avatar
    Zanthina

    check.

    Like

  61. Test Avatar
    Test

    Test

    Like

  62. matija Avatar
    matija

    testing

    Like

  63. Balud Avatar

    Just to see if my gravatar will appear. I have registerd from 15th of Feb and no gravatar seen

    Like

  64. Kaos Avatar

    Me happen something strange. I can see avatars and my friend’s avatars but my friends cannot see their avatar.

    Like

  65. riza Avatar

    something wrong, it’s only the blue g

    Like

  66. Wady Avatar

    so cool

    Like

  67. The Mole Avatar

    ..is it here?

    Like

  68. Todd Avatar
    Todd

    Testing as well…

    Like

  69. Renee Avatar
    Renee

    Apparently the site died… get a 403 error…

    Like

  70. gailv Avatar
    gailv

    It can show up here, but why not on blog?

    Like

  71. rude Avatar
  72. Please Avatar
    Please

    Would be grand

    Like

  73. Ren Yushiro Avatar

    Wanna test too ’cause in my blog, it doesnt work

    Like

  74. Me Avatar
    Me

    Does it work?

    Like

  75. BCSEEATI Avatar

    Gravatar reassigned… testing…

    Like

  76. cmon gravatar Avatar
    cmon gravatar

    what’s wrong if it only works here

    Like

  77. PK Avatar

    Just a test to see if it is working here (what about an official test thread ;-))

    Like

  78. Ulf Avatar
    Ulf

    test test test. Nope

    Like

  79. 800A Avatar

    Yeah! gravatars works in my blog!! great job Tom 😉

    Like

  80. silpheed Avatar

    yay for gravatars! i’m implementing them in my blog as we speak, but i think i might have found a bug. i’ve deliberately given my gravatar a rating of X and set my src strings to accept PG or below only (with &rating=PG). i also specify a default avatar (properly url encoded of course), but that default avatar doesn’t show for my X rated gravatar, i just get the blue icon with the white g.

    the default avatar DOES work for invalid gravatar IDs and valid gravatar IDs with no picture associated, but not for gravatars that are rated too high. is this expected behaviour? am i going mad?

    Like

  81. Lizzie Avatar

    Hi, testing but mostly wondering why my gravatar is rated x when it should be rated G.
    Thanks to this it doesn’t show anywhere, could you fix it please?
    Thanks.

    Like

  82. testing Avatar
    testing

    Test.

    Like

  83. c.urdaneta Avatar

    Thanks for the fix Tom
    Now my Gravatar works like a charm!

    Like

  84. Astorg Avatar

    Well, I’m really glad if its fixed at long last. Welcome back.

    Like

  85. Diane Avatar
    Diane

    This is a test.

    Like

  86. leila Avatar

    siri e alemao

    Like

  87. Questan Avatar
    Questan

    Tom: Will you sell Gravatar to Google? What guarantees do you give your users? Is it safe to implement? You never give any news.

    Like

  88. GeTa Avatar

    ________

    Like

  89. Thomas Aylott Avatar

    S3 is keen. We’re using that over at CrazyEgg for our screenshots.

    Like

  90. Chris Williams Avatar

    The whole rating thing is a mess, whoever decided a) never even point out that there ARE ratings on gravatars anywhere in the signup process, b) to make the default rating X, and more importantly c) to make the UI for seeing what it is rated, and or setting the rating completely obtuse, should be shot.

    I’ve been wondering for ages why my gravatar didn’t show anywhere, just the BLUE G. Happened upon a post that mentioned ratings (never had heard of them). Stumble around here, and find that magically if I hover my mouse near my image, some cryptic X comes up. What’s that? I click on it, and it tells my I’m X rated. Choose ‘G’, and say OK. Test it. Still the BLUE G. Hmmm… so I select to make the same gravatar (now apparently G rated) the current one, and magically it works.

    How about some documentation and a BIG HUGE INDICATION OF WHAT THE RATING IS, AND HOW TO SET IT?

    Thanks,
    Chris

    Like

  91. felipe Avatar
    felipe

    ca marche ?!

    Like

  92. Barbra Avatar

    Does it work?

    Like

  93. Mark Avatar
    Mark

    Testing.

    Like

  94. ItISDeaD Avatar
    ItISDeaD

    Gravatar is dead…

    Like

  95. Piggy Avatar

    Hmm… gravatar.com doesent seem to be working :S

    Like

  96. Mar Avatar
    Mar

    my gravatar doesn’t work

    Like

  97. Liisa Avatar
    Liisa

    testing

    Like

  98. Utena Avatar
    Utena

    Is it working now ?

    Like

  99. kristy Avatar

    I have been trying to join all day today, and keep getting an error message. Just thought I’d mention it. You know. 🙂

    Like

  100. Mary Avatar
    Mary

    Why my new gravatar dont show up??

    OMG ¬¬!!

    Like

  101. Remy Sharp Avatar

    Hi there,

    I’m consistently getting the following error when I try to add another email address to my account:

    Application error

    Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html

    Sorry I had to post this in the comments to a blog, but I couldn’t find any other way of notifying of the problem.

    Like

  102. Hell Paris Avatar
    Hell Paris

    Hope works!

    Like

  103. Somebody Avatar
    Somebody

    Testing! =P

    Like

  104. Jana Avatar

    I only get the Blue G when I post to any sites…but my Gravatar is showing up in my account. Any clue why???

    Like

  105. ashton Avatar
    ashton

    i’m back to test.

    Like

  106. Jakub Avatar
    Jakub

    This service is pretty cool.

    Like

  107. Jeff Avatar
    Jeff

    People, Liisa is correct. At this time only JPEG graphics are working for some reason. If you want to add a new Gravatar, first make sure your image is saved as a .jpg file and then add it to gravatar.com.

    Like

  108. Mike Avatar

    Jana,

    The image you uploaded maybe to large in pixel size or file size that the site has set for allowed perams. Check with the site(s) that you go to and ask what their limitations are. They may even not know that their image convert program is not working possibly.

    Like

  109. Erik J. Barzeski Avatar

    Now it works. I went back into my profile and “re-confirmed” the current one. That seems to have properly forced a sync.

    Like

  110. S-King Avatar
    S-King

    testing

    Like

  111. h0bbel Avatar

    Gravatars are back. Thanks!!

    Like

  112. Sad Avatar
    Sad

    Help?

    Like

  113. Liesbeth Avatar

    it still don’t work for me, this is what I see when I click on the button: this page is not availeble

    Like

  114. daphne Avatar
    daphne

    It still has not worked for me. What am I doing wrong?

    Like

  115. james Avatar

    Testing. Sorry for bothering you.

    Like

  116. tentirujo Avatar

    not working 😥

    Like

  117. ping Avatar
    ping

    Checking my avatar…

    Like

  118. Fabric Avatar

    At last bugfix

    Like

  119. hanzo Avatar

    Finally everything seems to be working!
    Joy!

    Like

  120. Barnim Avatar

    Schau mer mal, obs jetzt funktioniert … testing

    Like

  121. Jason Avatar

    Finally, back on 🙂

    Like

  122. Freddy Avatar
    Freddy

    That sounds good!!!!

    Like

  123. welmar Avatar
    welmar

    test

    Like

  124. StarChild Avatar

    I didn’t see a forum where I could ask this and there is no help available yet so I thought I’d try here and see if anyone could help me. For months I’ve been having the problem that no one’s avatars show up on my site. They used to work, and then just stopped working one day suddenly. Everyone just gets my default av. And I KNOW that many of those commenters have gravatars. At first I thought it was because of the new launch coming up, but gravatars on other blogs were fine. When I check the cache everyone has NO GRAVATAR(E). No amount of cache deleting or refreshing has fixed it. My local gravatar works fine. Just not the other ones. Has this happened to anyone else? Any thoughts on why this could be? It’s driving me crazy!

    Like

  125. blang Avatar

    How can I recognize the default Gravatar image is being returned and decide in my blog to not show it – or in my case, use another image?

    Like

  126. Rob Avatar
    Rob

    Nice one. Hopefully mine should start working soon……

    I signed up on Feb 16 and have not seen it working yet!

    Fingers crossed….

    Like

  127. chaoskaizer Avatar

    its work fine. yeah

    Like

  128. Tatiana Avatar

    how I can modify my password?

    Like

  129. buchin Avatar

    testing gravatar

    Like

  130. Jeff Cristi Avatar
    Jeff Cristi

    testing

    Like

  131. Cris Avatar
    Cris

    Curious… it appears that when a default avatar is specified, the rating gets applied too strictly. I have a G rated avatar, and it shows up when the url string says rating=G, but when it says rating=PG, the default appears.

    I expect the rating specification to mean “this rating and below,” not “only this rating.” And that’s how it seems to work when no default is specified.

    Like

  132. @lun Avatar

    Yes it does 🙂
    ’bout time an all 😀

    Like

  133. Eli Sand Avatar

    Not sure how long it’s supposed to take before the avatar is synced, but mine isn’t working after almost 24hrs. Also, the site randomly times out my requests (though the function actually gets performed, the browser just sits loading forever).

    I have also noticed some errors in your implementation code for PHP (and Perl as well). To begin, you are encoding the ampersand symbol in your URL when it should *NOT* be encoded since it is not data, but a variable separator in it’s intended use.

    I have made several fixes to your WordPress plugin as well – I’d like to give you the updated copy so just contact me on how I can do that.

    Like

  134. craig Avatar

    Testing

    Like

  135. markcas Avatar

    also testing…

    Like

  136. Seb Avatar
    Seb

    test

    Like

  137. Pii Avatar
    Pii

    Just a test

    Like

  138. Mat Avatar
    Mat

    Well, since everyone is testing here, I might as well…

    Like

  139. Sascha A. Carlin Avatar

    A more technical question: Why do you use Amazon S3 to spread the images in the first place?

    Why not rent another server and let this be the host and source for the two on the front end and sync via rsync?

    Like

  140. H.A.L. Avatar
    H.A.L.

    Is this working?

    Like

  141. Kiere Avatar
    Kiere

    The blog seems to be online, but I went to the site.gravatar.com link it always times out with a 502 error. Anyone know anything about this?

    Like

  142. Roly Avatar
    Roly

    Why this code not working??

    $email = “someone@somewhere.com”;
    $default = “http://www.somewhere.com/homestar.jpg”;
    $size = 40;

    You can construct your gravatar url with the following php code:

    $grav_url = “http://www.gravatar.com/avatar.php?
    gravatar_id=”.md5($email).
    “&default=”.urlencode($default).
    “&size=”.$size;

    Like

  143. Mladen Mihajlovic Avatar

    png images definitely seem to be causing a problem. I uploaded a new avatar – linked it to my email – and the image has not changed in something like 3 days.

    Like

  144. Linda Avatar
    Linda

    I changed my gravatar yesterday and it was switching back and forth between my old and new most of the day. Today I went in and deleted my old one from the file and now my new one is not showing up at all. Mostly I use it in Haloscan comments. Is there something I need to do to clear old cookies or temp files or something to get it to work properly?

    Like

  145. Hatem Avatar
    Hatem

    tesing again, seems nothing ? I have added my gravatar the first day the website launched maybe 😦 so long

    Like

  146. Guy Avatar

    Curious if my avatar does work here…

    Like

  147. JR Avatar
    JR

    Gravatars working but gravatar.com is returning a 503 since yesterday. Anyone know what’s up?

    Like

  148. Marie Avatar

    Testing my gravatar here too…

    Like

  149. balou Avatar

    Hello everyone 🙂

    On teste le gravatar hein ! Sorry, i am french because ?
    oui je me soigne …

    Like

  150. robin Avatar

    I couldn’t agree more. Thanks for arcticle.

    Like

  151. Test again Avatar
    Test again

    test

    Like

  152. Pete Avatar

    Testing

    Like

  153. Justest Avatar
    Justest

    Test

    Like

  154. afddsfasdasdfasdfasdfasdfasdfasdf Avatar
    afddsfasdasdfasdfasdfasdfasdfasdf

    afsfasdf

    Like

  155. Ian Avatar
    Ian

    And does this work?

    Like

  156. Ponzi Avatar

    @ Ian: Very good !

    Like

  157. Ian Quigley Avatar

    Please create a test page. I can’t get image link to work just yet. (Unless I post a comment here and look at the html source?)

    Like

  158. Wazungu Avatar

    Thanks for working on it – I’ll try the gravitar plugins now for my site. Have a good day!

    Like

  159. pierluigi Avatar

    test.. and thanks for this service!

    Like

  160. Shane Avatar

    I seem to still be having the wrong gravatar coming up – showing one that was deleted a day ago. If this is working then I should have a yellow background behind me.

    If it does work here – is there a known issue with the 2.62 Gravatars2 plugin for WordPress (http://zenpax.com/gravatars2/)?

    Regards,
    Shane.

    Like

  161. Nicki Avatar

    Gravatar svcs down? I haven’t been able to get to anything on this site except this blog all day. 😛

    Like

  162. Name Avatar
    Name

    … and the fucking retard dies again.

    Like

  163. 가우리 Avatar

    Server Error –;

    Like

  164. Reid Avatar

    The main gravatar.com site is down, let alone svcs or subversion, or whatever. The server is saying:

    Service Temporarily Unavailable

    The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

    Additionally, a 503 Service Temporarily Unavailable error was encountered while trying to use an ErrorDocument to handle the request.

    Like

  165. thomasn528 Avatar

    testing, testing.

    Like

  166. baron Avatar

    are they back?

    Like

  167. nova Avatar

    not so much

    Like

  168. Gerald Avatar

    Doesn’t work for me … i’ve reapplied my avatar multiple times, still the old one is shown.

    Like

  169. seriously_black Avatar
    seriously_black

    Interesting problem. Glad you found it. I hope that means that gravatars will start working again soon.

    Like

  170. Ma Avatar

    testing

    Like

  171. Nat Avatar

    Works great for me, good work, love the new features!

    Like

  172. paikia Avatar

    testing again

    Like

  173. blackhat Avatar
    blackhat

    nice

    Like

  174. Jenny Avatar
  175. Elizabeth Avatar
    Elizabeth

    Hi, my gravatar doesn’t show anywhere, the email is good & it’s rated g.
    Any help would be great, thanks.

    Like

  176. Joseph Crawford Avatar

    i signed up and altered my site only to reverse the code ;( I found that my avatar was not showing properly, i am not sure what the case may be but at the URL http://www.gravatar.com/avatar.php?gravatar_id=bf6bc93ab3eeef8996970fa8ac9895a3
    it shows the gravatar logo

    Like

  177. Mike Avatar

    just testing. thanks for a great service 🙂

    Like

  178. Test Avatar
    Test

    Test 12345

    Like

  179. Jane Avatar
    Jane

    Test!

    Like

  180. LL Avatar
    LL

    Hope this got fixed.

    Like

  181. Very Different Avatar

    Thank you ..
    Known rebuilding.

    Like

  182. […] vom 3. März: Offensichtlich ist das Problem nun behoben, wie dieser Beitrag zeigt. Hoffentlich bleibt es […]

    Like

%d