Buildout -- Software for automating application assembly

add a "timeout" global option

Reported by Tarek Ziadé on 2008-04-07
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Buildout
Undecided
Unassigned

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
    socket.setdefaulttimeout(10)

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

   [buildout]

   timeout = 10

This could be done in the buildout.py 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/package_index.py", line 318, in obtain
  File "/home/sridharr/as/pypm/eggs/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 303, in find_packages
  File "/home/sridharr/as/pypm/eggs/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 617, in scan_url
  File "/home/sridharr/as/pypm/eggs/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 201, in process_url
  File "/home/sridharr/as/pypm/eggs/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 278, in process_index
  File "/home/sridharr/as/pypm/eggs/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 617, in scan_url
  File "/home/sridharr/as/pypm/eggs/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 189, in process_url
  File "/home/sridharr/as/pypm/eggs/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 579, in open_url
  File "/home/sridharr/as/pypm/eggs/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 717, in open_with_auth
  File "/opt/ActivePython-2.6/lib/python2.6/urllib2.py", line 124, in urlopen
    return _opener.open(url, data, timeout)
  File "/opt/ActivePython-2.6/lib/python2.6/urllib2.py", line 383, in open
    response = self._open(req, data)
  File "/opt/ActivePython-2.6/lib/python2.6/urllib2.py", line 401, in _open
    '_open', req)
  File "/opt/ActivePython-2.6/lib/python2.6/urllib2.py", line 361, in _call_chain
    result = func(*args)
  File "/opt/ActivePython-2.6/lib/python2.6/urllib2.py", line 1130, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/opt/ActivePython-2.6/lib/python2.6/urllib2.py", line 1103, in do_open
    r = h.getresponse()
  File "/opt/ActivePython-2.6/lib/python2.6/httplib.py", line 950, in getresponse
    response.begin()
  File "/opt/ActivePython-2.6/lib/python2.6/httplib.py", line 390, in begin
    version, status, reason = self._read_status()
  File "/opt/ActivePython-2.6/lib/python2.6/httplib.py", line 348, in _read_status
    line = self.fp.readline()
  File "/opt/ActivePython-2.6/lib/python2.6/socket.py", 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 'http://cmdln.googlecode.com/svn/branches/cfg#egg=cmdln-1.2.0' 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