Connection reset by peer

Bug #523378 reported by tomribbens
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Facebook Friends Graph
Kamran Riaz Khan

Bug Description

I can't get through my friends list (not even 15%) because everytime a connection reset by peer error occurs. This probably isn't the program's fault, but it would be nice if it would catch the error and retry or something.

tom@laptop-tom:~/fbfriends/fbfriendsgraph$ python
/home/tom/fbfriends/fbfriendsgraph/facebook/ DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.6/", line 525, in __bootstrap_inner
  File "", line 149, in run
    iconnections = self.fb.friends.areFriends(ilist, myfriends)
  File "<string>", line 6, in areFriends
  File "/home/tom/fbfriends/fbfriendsgraph/facebook/", line 517, in __call__
    return self._client('%s.%s' % (self._name, method), args)
  File "/home/tom/fbfriends/fbfriendsgraph/facebook/", line 1000, in __call__
    response = urlread(self.facebook_url, post_data)
  File "/home/tom/fbfriends/fbfriendsgraph/facebook/", line 101, in urlread
    res = urllib2.urlopen(url, data=data)
  File "/usr/lib/python2.6/", line 124, in urlopen
    return, data, timeout)
  File "/usr/lib/python2.6/", line 389, in open
    response = self._open(req, data)
  File "/usr/lib/python2.6/", line 407, in _open
    '_open', req)
  File "/usr/lib/python2.6/", line 367, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.6/", line 1146, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.6/", line 1121, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 104] Connection reset by peer>

Related branches

Revision history for this message
Kamran Riaz Khan (inspirated) wrote :

Do you encounter the same error if you try someone else's account in the application?

Revision history for this message
tomribbens (tom-ribbens) wrote :

I have only been able to try with another account with 9 friends, and that worked without problems. My account is much bigger though, with 700+ friends, and it fails at various stages. One time now, i've seen it go up to 75% to fail then.

Revision history for this message
Kamran Riaz Khan (inspirated) wrote :

Rev 5 in the testing branch tries to catch all exceptions and retry API calls. Please check it out and report if the issue is resolved.

Changed in fbfriendsgraph:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Kamran Riaz Khan (inspirated)
Revision history for this message
tomribbens (tom-ribbens) wrote :

I got through the complete data collection. I have seen UID being mentioned multiple times in a row, so I guess that were the instances where I earlier got an error.

It is currently still generating the graph. It takes a long time, but I guess that's normal.

Changed in fbfriendsgraph:
status: In Progress → Fix Committed
Revision history for this message
Kamran Riaz Khan (inspirated) wrote :

With 700+ friends tom, I wouldn't be surprised if it takes half a day to generate the graph. I only have 300 something and it takes roughly 10-15 minutes for generation and then a further couple of minutes for loading the graph in an image viewer.

My apologies if it lets you down but you would need some *really* mammoth hardware specs to make something out of this application with such a colossal friend count :) .

Revision history for this message
tomribbens (tom-ribbens) wrote :

I know it's an exponential function of time as more friends are added. There is a java based applet that generates something like this, but interactive. It's unusable long before i get up to 700 friends.

The Nexus app i mentioned in a question managed to generate a graph for me in a matter of minutes, gathering data and all. Don't know what specs that server had though. That was a really sweet app, too bad the author no longer hosts it.

Changed in fbfriendsgraph:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers