Connection reset by peer

Bug #523378 reported by tomribbens on 2010-02-17
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Facebook Friends Graph
Medium
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 fbfriendsgraph.py
/home/tom/fbfriends/fbfriendsgraph/facebook/__init__.py:47: 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/threading.py", line 525, in __bootstrap_inner
    self.run()
  File "fbfriendsgraph.py", line 149, in run
    iconnections = self.fb.friends.areFriends(ilist, myfriends)
  File "<string>", line 6, in areFriends
  File "/home/tom/fbfriends/fbfriendsgraph/facebook/__init__.py", line 517, in __call__
    return self._client('%s.%s' % (self._name, method), args)
  File "/home/tom/fbfriends/fbfriendsgraph/facebook/__init__.py", line 1000, in __call__
    response = urlread(self.facebook_url, post_data)
  File "/home/tom/fbfriends/fbfriendsgraph/facebook/__init__.py", line 101, in urlread
    res = urllib2.urlopen(url, data=data)
  File "/usr/lib/python2.6/urllib2.py", line 124, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.6/urllib2.py", line 389, in open
    response = self._open(req, data)
  File "/usr/lib/python2.6/urllib2.py", line 407, in _open
    '_open', req)
  File "/usr/lib/python2.6/urllib2.py", line 367, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.6/urllib2.py", line 1146, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.6/urllib2.py", line 1121, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 104] Connection reset by peer>

Related branches

lp:~inspirated/fbfriendsgraph/testing
Kamran Riaz Khan: Approve on 2010-02-21
Kamran Riaz Khan (inspirated) wrote :

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

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.

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)
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
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 :) .

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