add a "timeout" global option

Bug #213459 reported by Tarek Ziadé on 2008-04-07
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

Today we experienced a major problem with one of the servers that is used to build
our plone buildouts.

Since the default socket timeout is none, it can get stocked for ever

We added a global socket timeout in our bin/buildout script, to speed things up::

    import socket

Maybe this could be a interesting option to have in buildout ? ::


   timeout = 10

This could be done in the module, by saving the current timeout value,
setting it, and restoring it when the buildout is finised.

This would make developers life easier when a url cannot be obtained.

Sridhar Ratnakumar (srid) wrote :

This is actually a setuptools/distribute issue. Pressing C-c should give:

  File "/home/sridharr/as/pypm/eggs/setuptools-0.6c9-py2.6.egg/setuptools/", line 318, in obtain
  File "/home/sridharr/as/pypm/eggs/setuptools-0.6c9-py2.6.egg/setuptools/", line 303, in find_packages
  File "/home/sridharr/as/pypm/eggs/setuptools-0.6c9-py2.6.egg/setuptools/", line 617, in scan_url
  File "/home/sridharr/as/pypm/eggs/setuptools-0.6c9-py2.6.egg/setuptools/", line 201, in process_url
  File "/home/sridharr/as/pypm/eggs/setuptools-0.6c9-py2.6.egg/setuptools/", line 278, in process_index
  File "/home/sridharr/as/pypm/eggs/setuptools-0.6c9-py2.6.egg/setuptools/", line 617, in scan_url
  File "/home/sridharr/as/pypm/eggs/setuptools-0.6c9-py2.6.egg/setuptools/", line 189, in process_url
  File "/home/sridharr/as/pypm/eggs/setuptools-0.6c9-py2.6.egg/setuptools/", line 579, in open_url
  File "/home/sridharr/as/pypm/eggs/setuptools-0.6c9-py2.6.egg/setuptools/", line 717, in open_with_auth
  File "/opt/ActivePython-2.6/lib/python2.6/", line 124, in urlopen
    return, data, timeout)
  File "/opt/ActivePython-2.6/lib/python2.6/", line 383, in open
    response = self._open(req, data)
  File "/opt/ActivePython-2.6/lib/python2.6/", line 401, in _open
    '_open', req)
  File "/opt/ActivePython-2.6/lib/python2.6/", line 361, in _call_chain
    result = func(*args)
  File "/opt/ActivePython-2.6/lib/python2.6/", line 1130, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/opt/ActivePython-2.6/lib/python2.6/", line 1103, in do_open
    r = h.getresponse()
  File "/opt/ActivePython-2.6/lib/python2.6/", line 950, in getresponse
  File "/opt/ActivePython-2.6/lib/python2.6/", line 390, in begin
    version, status, reason = self._read_status()
  File "/opt/ActivePython-2.6/lib/python2.6/", line 348, in _read_status
    line = self.fp.readline()
  File "/opt/ActivePython-2.6/lib/python2.6/", line 395, in readline
    data = recv(1)

Sridhar Ratnakumar (srid) wrote :

As for buildout behavior, even with a -vv option I don't see *which* URL is timing out:

Adding find link '' from pypm 0.1a2
We have the best distribution that satisfies 'sphinx'.
Picked: Sphinx = 0.6.2
Download error: timed out -- Some packages may not be found!
Download error: timed out -- Some packages may not be found!

At least this part needs to be fixed, for how else, other than hacking setuptools files, would I be able to determine the URL that is timing out? (so as to setup a mirror of that)

Domen Kožar (ielectric+) wrote :

This is fixed a long ago, should be fixed.

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

Other bug subscribers