Thisisdotme / thisis.me

1 stars 1 forks source link

Connection Error: Max retries exceeded with url #60

Closed jsancio closed 12 years ago

jsancio commented 12 years ago

ERROR 2012-07-02 22:11:16,829 140608845788928 /opt/tim/thisis.me/commons/tim_commons/message_queue.py:130] Error in handler for event: {'body': '{"header":{"type":"facebook.event","version":1},"message":{"links":null,"service_author_id":"538781807","service_event_id":"538781807_10151735553131808","service_event_json":{"caption":"Entertainment","comments":{"count":0},"created_time":"2012-06-13T13:04:53+0000","from":{"id":"538781807","name":"Tina Galve"},"icon":"http://static.ak.fbcdn.net/rsrc.php/v2/yN/r/xC785tTCIQO.gif","id":"538781807_10151735553131808","link":"http://www.facebook.com/tokyootakumode","name":"Tokyo Otaku Mode","picture":"http://profile.ak.fbcdn.net/hprofile-ak-snc4/373016_187477207946509_1316386796_n.jpg","story":"Tina Galve likes Tokyo Otaku Mode.","story_tags":{"0":[{"id":538781807,"length":10,"name":"Tina Galve","offset":0,"type":"user"}],"17":[{"id":187477207946509,"length":16,"name":"Tokyo Otaku Mode","offset":17,"type":"page"}]},"to":{"data":[{"id":"100000145162512","name":"Armilene Bonzon"},{"id":"1684898077","name":"Juco Antonio Rivera"},{"id":"668896085","name":"Tel Castillo"},{"id":"1760543586","name":"Ghayo Aska \u2267\u25e1\u2266"}]},"type":"link","updated_time":"2012-06-13T13:04:53+0000"},"state":"current_state","tim_author_id":5}}', 'exchange': '', 'consumer_tag': 'amq.ctag-Aq_0hcbqywxMLr5xdN47sv', 'promise_number': 21, 'routing_key': 'facebook.event', 'headers': {'x-puka-delivery-tag': 25780}, 'redelivered': False, 'delivery_tag': 25780} Traceback (most recent call last): File "/opt/tim/thisis.me/commons/tim_commons/message_queue.py", line 126, in join handlersresult['routing_key'] File "/opt/tim/thisis.me/event_processor/driver.py", line 82, in handler body['links']) File "/opt/tim/thisis.me/event_processor/event_processors/event_processor.py", line 123, in process self.me_service_id) File "/opt/tim/thisis.me/event_processor/event_correlator.py", line 39, in correlate_and_update_event service_event.correlation_id, url = _correlate_event(event_json) File "/opt/tim/thisis.me/event_processor/event_correlator.py", line 20, in _correlate_event normalized_uri = _normalize_uri(uri) File "/opt/tim/thisis.me/event_processor/event_correlator.py", line 28, in _normalize_uri request = requests.head(uri, allow_redirects=True) File "/opt/tim/thisis.me/env/lib/python2.6/site-packages/requests/api.py", line 76, in head return request('head', url, _kwargs) File "/opt/tim/thisis.me/env/lib/python2.6/site-packages/requests/safe_mode.py", line 37, in wrapped return function(method, url, _kwargs) File "/opt/tim/thisis.me/env/lib/python2.6/site-packages/requests/api.py", line 42, in request return s.request(method=method, url=url, **kwargs) File "/opt/tim/thisis.me/env/lib/python2.6/site-packages/requests/sessions.py", line 230, in request r.send(prefetch=prefetch) File "/opt/tim/thisis.me/env/lib/python2.6/site-packages/requests/models.py", line 609, in send

ConnectionError: HTTPConnectionPool(host='www.facebook.com', port=80): Max retries exceeded with url: /tokyootakumode

jsancio commented 12 years ago

It seems to be an issue with how the processor identifies changes. It look like the updater is trying to update service_event.id = 588 every 5 minutes. And the JSON does seem to be different every time.

jsancio commented 12 years ago

It looks like the json library doesn't serialize the list in the same order every time. We may need to do the diff calculations manually.