"Too many concurrent requests" error during reconcile

Bug #503878 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Andrew Bennetts

Bug Description

Got this while running a reconcile on a branch recently upgraded to 2a.

In another terminal I was also running upgrades for landscape staging and production, I wonder if that had anything to do with this error.

andreas@chinstrap:~$ time bzr reconcile lp:~landscape/landscape/trunk
Reconciling branch bzr+ssh://bazaar.launchpad.net/~landscape/landscape/trunk/
revision_history ok.
Reconciling repository bzr+ssh://bazaar.launchpad.net/~landscape/landscape/trunk/
Connection to bazaar.launchpad.net closed by remote host.exts:Finding text references 11184/14017
bzr: ERROR: bzrlib.errors.TooManyConcurrentRequests: The medium 'SmartSSHClientMedium(connected=True, username=u'ahasenack', host='bazaar.launchpad.net', port=None)' has reached its concurrent request lim
it. Be sure to finish_writing and finish_reading on the currently open request.

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 1597, in run
    reconcile(dir)
  File "/usr/lib/python2.5/site-packages/bzrlib/reconcile.py", line 53, in reconcile
    reconciler.reconcile()
  File "/usr/lib/python2.5/site-packages/bzrlib/reconcile.py", line 77, in reconcile
    self._reconcile()
  File "/usr/lib/python2.5/site-packages/bzrlib/reconcile.py", line 84, in _reconcile
    self._reconcile_repository()
  File "/usr/lib/python2.5/site-packages/bzrlib/reconcile.py", line 103, in _reconcile_repository
    repo_reconciler = self.repo.reconcile(thorough=True)
  File "/usr/lib/python2.5/site-packages/bzrlib/remote.py", line 1447, in reconcile
    return self._real_repository.reconcile(other=other, thorough=thorough)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 2347, in reconcile
    reconciler.reconcile()
  File "/usr/lib/python2.5/site-packages/bzrlib/reconcile.py", line 200, in reconcile
    self._reconcile_steps()
  File "/usr/lib/python2.5/site-packages/bzrlib/reconcile.py", line 522, in _reconcile_steps
    collection._unlock_names()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1861, in _unlock_names
    self.repo.control_files.unlock()
  File "/usr/lib/python2.5/site-packages/bzrlib/lockable_files.py", line 233, in unlock
    self._lock.unlock()
  File "/usr/lib/python2.5/site-packages/bzrlib/lockdir.py", line 308, in unlock
    self.confirm()
  File "/usr/lib/python2.5/site-packages/bzrlib/lockdir.py", line 404, in confirm
    info = self.peek()
  File "/usr/lib/python2.5/site-packages/bzrlib/lockdir.py", line 427, in peek
    info = self._read_info_file(self._held_info_path)
  File "/usr/lib/python2.5/site-packages/bzrlib/lockdir.py", line 417, in _read_info_file
    return self._parse_info(self.transport.get(path))
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/remote.py", line 221, in get
    return StringIO(self.get_bytes(relpath))
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/remote.py", line 226, in get_bytes
    resp, response_handler = self._client.call_expecting_body('get', remote)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/client.py", line 142, in call_expecting_body
    method, args, expect_response_body=True)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/client.py", line 76, in _call_and_read_response
    readv_body=readv_body, body_stream=body_stream)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/client.py", line 42, in _send_request
    protocol_version)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/client.py", line 112, in _construct_protocol
    request = self._medium.get_request()
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/medium.py", line 699, in get_request
    return SmartClientStreamMediumRequest(self)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/medium.py", line 904, in __init__
    raise errors.TooManyConcurrentRequests(self._medium)
TooManyConcurrentRequests: The medium 'SmartSSHClientMedium(connected=True, username=u'ahasenack', host='bazaar.launchpad.net', port=None)' has reached its concurrent request limit. Be sure to finish_writing and finish_reading on the currently open request.

bzr 2.0.2 on python 2.5.2 (Linux-2.6.24-23-server-i686-with-debian-lenny-sid)
arguments: ['/usr/bin/bzr', 'reconcile', 'lp:~landscape/landscape/trunk']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [2.0.0]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [2.0.2]
  netrc_credential_store /usr/lib/python2.5/site-packages/bzrlib/plugins/netrc_credential_store [2.0.2]

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

real 79m48.457s
user 59m22.460s
sys 0m24.130s

Related branches

Revision history for this message
Martin Pool (mbp) wrote :

The real root problem here is

>Connection to bazaar.launchpad.net closed by remote host.

probably because of you upgrading it.

However, the error is pretty ugly.

poolie: spiv, re bug 503878, i thought we now did better than TooManyConcurrentRequests when the server dropped the connection
ubottu: Launchpad bug 503878 in bzr ""Too many concurrent requests" error during reconcile" [Undecided,New] https://launchpad.net/bugs/503878
11:55
spiv: poolie: often, although I see that bzrlib/reconcile.py has a "try: ... finally: collection._unlock_names()" which is what's been tripped here.
spiv: poolie: i.e. an unconditional attempt to perform a cleanup over the network even if the network connection has gone away.
poolie: right
spiv: I'll put together a simple fix for that for trunk.

Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Andrew Bennetts (spiv)
Andrew Bennetts (spiv)
Changed in bzr:
milestone: none → 2.1.0rc1
status: Confirmed → 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.