Connections can hang forever

Bug #1273329 reported by Aaron Bentley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python Jenkins
Fix Released
Undecided
Khai Do

Bug Description

Jenkins does not always connect, but this library does not provide for http timeouts. Just this weekend, I saw a script hang for 36 hours because of this, even though this script was running against localhost. I will try setting socket.setdefaulttimeout, but globals are bad and a sane default would be better.

Aaron Bentley (abentley)
description: updated
description: updated
Revision history for this message
Antoine "hashar" Musso (hashar) wrote :

Seems python url lib does not support setting a timeout :-/

Revision history for this message
Aaron Bentley (abentley) wrote :

python-jenkins uses urllib2.urlopen, which does accept a timeout.

Khai Do (zaro0508)
Changed in python-jenkins:
assignee: nobody → Khai Do (zaro0508)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-jenkins (master)

Fix proposed to branch: master
Review: https://review.openstack.org/138982

Changed in python-jenkins:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-jenkins (master)

Reviewed: https://review.openstack.org/138982
Committed: https://git.openstack.org/cgit/stackforge/python-jenkins/commit/?id=e197dd54544da848ec86c8843b883221c69afb31
Submitter: Jenkins
Branch: master

commit e197dd54544da848ec86c8843b883221c69afb31
Author: Khai Do <email address hidden>
Date: Thu Dec 4 00:16:09 2014 -0800

    Add a default http timeout for connections to jenkins

    Without a timeout a script can hang forever when attempting
    to connect to jenkins. This change sets a default timeout
    of 2 minutes. Selection of default value is pretty arbitrary
    on this change.

    Closes-Bug: #1273329
    Change-Id: If84778231b88d78a02a89a56f38f95d6deada80a

Changed in python-jenkins:
status: In Progress → Fix Committed
Khai Do (zaro0508)
Changed in python-jenkins:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.