Merge lp:~mterry/ubuntuone-couch/longer-timeout into lp:ubuntuone-couch

Proposed by Michael Terry
Status: Merged
Approved by: dobey
Approved revision: 9
Merged at revision: 9
Proposed branch: lp:~mterry/ubuntuone-couch/longer-timeout
Merge into: lp:ubuntuone-couch
Diff against target: 11 lines (+1/-1)
1 file modified
ubuntuone/couch/auth.py (+1/-1)
To merge this branch: bzr merge lp:~mterry/ubuntuone-couch/longer-timeout
Reviewer Review Type Date Requested Status
dobey (community) Approve
Eric Casteleijn (community) Approve
Review via email: mp+61993@code.launchpad.net

Commit message

Increase httplib2 timeout to 10 seconds

Description of the change

Once the fix for bug 784710 is merged, one can use auth.request for PUT requests. But the Ubuntu One file service always seems to time out using the default timeout value.

That is, the files get to the server alright and are visible, but SSL times out waiting for the response from the server. It always gives a "ssl.SSLError: The read operation timed out" message.

I've found that increasing the timeout to 10 reliably avoids that error for me. With the default timeout, I always hit the error.

To post a comment you must log in.
Revision history for this message
Eric Casteleijn (thisfred) wrote :

Would be happy to accept this, but the diff shows a conflict, likely because the other branch was already merged. Could you pull again/remerge trunk, and push again?

review: Needs Fixing
9. By Michael Terry

merge from trunk

Revision history for this message
Michael Terry (mterry) wrote :

Oh, whoops! Updated.

Revision history for this message
Eric Casteleijn (thisfred) wrote :

Great!

review: Approve
Revision history for this message
dobey (dobey) wrote :

That's a bit odd. I would have expected the default timeout to be 30 seconds? (Or 600 seconds, which is the standard default TCP timeout in the networking stack.)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/couch/auth.py'
2--- ubuntuone/couch/auth.py 2011-05-19 19:52:36 +0000
3+++ ubuntuone/couch/auth.py 2011-05-23 17:19:27 +0000
4@@ -111,6 +111,6 @@
5 consumer, token, url, http_method, signature_method)
6 headers = headers or {}
7 headers.update(oauth_header)
8- http = httplib2.Http()
9+ http = httplib2.Http(timeout=10)
10 return http.request(
11 url, method=http_method, headers=headers, body=request_body)

Subscribers

People subscribed via source and target branches