Steps to reproduce together with full stack trace from current bzr.dev. I guess this might be mainly useful as a unit test case. Notice that thet error will leave a stale lock in place, which I'd consider another error. Imho all locks should be released using suitable 'finally' clauses. Or is the connection unusable after this error occurred? $ bzr init -q trunk $ echo one > trunk/foo $ bzr add -q trunk/foo $ bzr commit -q -m one trunk $ bzr branch -q trunk branch $ echo two > branch/foo $ bzr commit -q -m two branch $ bzr checkout bzr+ssh://localhost/${PWD}/trunk checkout $ bzr pull -d checkout bzr+ssh://localhost/${PWD}/branch bzr: ERROR: bzrlib.errors.TooManyConcurrentRequests: The medium 'SmartSSHClientMedium(bzr+ssh://None@localhost/)' has reached its concurrent request limit. Be sure to finish_writing and finish_reading on the currently open request. Traceback (most recent call last): File "bzrlib/commands.py", line 918, in exception_to_return_code return the_callable(*args, **kwargs) File "bzrlib/commands.py", line 1118, in run_bzr ret = run(*run_argv) File "bzrlib/commands.py", line 676, in run_argv_aliases return self.run(**all_cmd_args) File "bzrlib/commands.py", line 698, in run return self._operation.run_simple(*args, **kwargs) File "bzrlib/cleanup.py", line 135, in run_simple self.cleanups, self.func, *args, **kwargs) File "bzrlib/cleanup.py", line 165, in _do_with_cleanups result = func(*args, **kwargs) File "bzrlib/builtins.py", line 1080, in run show_base=show_base) File "bzrlib/decorators.py", line 217, in write_locked result = unbound(self, *args, **kwargs) File "bzrlib/workingtree.py", line 1013, in pull local=local) File "bzrlib/branch.py", line 1103, in pull possible_transports=possible_transports, *args, **kwargs) File "bzrlib/decorators.py", line 217, in write_locked result = unbound(self, *args, **kwargs) File "bzrlib/branch.py", line 3367, in pull run_hooks=False) File "bzrlib/decorators.py", line 217, in write_locked result = unbound(self, *args, **kwargs) File "bzrlib/remote.py", line 2992, in pull _override_hook_target=self, **kwargs) File "bzrlib/branch.py", line 1103, in pull possible_transports=possible_transports, *args, **kwargs) File "bzrlib/decorators.py", line 217, in write_locked result = unbound(self, *args, **kwargs) File "bzrlib/branch.py", line 3372, in pull merge_tags_to_master=not source_is_master) File "bzrlib/branch.py", line 3502, in _pull graph=graph) File "bzrlib/decorators.py", line 217, in write_locked result = unbound(self, *args, **kwargs) File "bzrlib/branch.py", line 3315, in _update_revisions self.fetch(stop_revision=stop_revision) File "bzrlib/decorators.py", line 217, in write_locked result = unbound(self, *args, **kwargs) File "bzrlib/branch.py", line 3292, in fetch fetch_spec=fetch_spec) File "bzrlib/remote.py", line 1660, in fetch find_ghosts=find_ghosts, fetch_spec=fetch_spec) File "bzrlib/decorators.py", line 217, in write_locked result = unbound(self, *args, **kwargs) File "bzrlib/vf_repository.py", line 2512, in fetch find_ghosts=find_ghosts) File "bzrlib/fetch.py", line 75, in __init__ self.__fetch() File "bzrlib/fetch.py", line 102, in __fetch self._fetch_everything_for_search(search_result) File "bzrlib/fetch.py", line 130, in _fetch_everything_for_search stream, from_format, []) File "bzrlib/remote.py", line 2106, in insert_stream (verb, path, resume_tokens) + lock_args, byte_stream) File "bzrlib/smart/client.py", line 181, in call_with_body_stream expect_response_body=False) File "bzrlib/smart/client.py", line 79, in _call_and_read_response readv_body=readv_body, body_stream=body_stream) File "bzrlib/smart/client.py", line 61, in _send_request encoder.call_with_body_stream((method, ) + args, body_stream) File "bzrlib/smart/protocol.py", line 1277, in _iter_with_errors yield None, iterator.next() File "bzrlib/smart/repository.py", line 519, in _stream_to_byte_stream for substream_type, substream in stream: File "bzrlib/remote.py", line 2291, in missing_parents_chain for kind, stream in self._get_stream(sources[0], search): File "bzrlib/remote.py", line 2237, in _get_stream verb, args, search_bytes) File "bzrlib/remote.py", line 79, in _call_with_body_bytes_expecting_body method, args, body_bytes) File "bzrlib/smart/client.py", line 170, in call_with_body_bytes_expecting_body method, args, body=body, expect_response_body=True) File "bzrlib/smart/client.py", line 79, in _call_and_read_response readv_body=readv_body, body_stream=body_stream) File "bzrlib/smart/client.py", line 45, in _send_request protocol_version) File "bzrlib/smart/client.py", line 115, in _construct_protocol request = self._medium.get_request() File "bzrlib/smart/medium.py", line 734, in get_request return SmartClientStreamMediumRequest(self) File "bzrlib/smart/medium.py", line 992, in __init__ raise errors.TooManyConcurrentRequests(self._medium) TooManyConcurrentRequests: The medium 'SmartSSHClientMedium(bzr+ssh://None@localhost/)' has reached its concurrent request limit. Be sure to finish_writing and finish_reading on the currently open request. bzr 2.5.0dev1 on python 2.7.2 (Linux-3.0.3-gentoo-x86_64-AMD_Phenom-tm-_II_X4_945_Processor-with-gentoo-2.0.3) arguments: ['bzr', '--no-plugins', 'pull', '-d', 'checkout', 'bzr+ssh://localhost//.../branch'] plugins: encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'de_DE.utf8' *** 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. $ cat trunk/foo one $ echo three > trunk/foo $ bzr commit -m three trunk Unable to obtain lock file:///.../trunk/ held by ... on ... (process #...), acquired 0 seconds ago. Will continue to try until ..., unless you press Ctrl-C. See "bzr help break-lock" for more. ^C