diff --git a/benchmarks/basic_commands.py b/benchmarks/basic_commands.py
index 5f3205ac0df2c0ee3ee8f55a5c9da965ceed75b3_YmVuY2htYXJrcy9iYXNpY19jb21tYW5kcy5weQ==..2f3ba08a290c2d8f6348a0858e3645fff0ca56d0_YmVuY2htYXJrcy9iYXNpY19jb21tYW5kcy5weQ== 100644
--- a/benchmarks/basic_commands.py
+++ b/benchmarks/basic_commands.py
@@ -23,6 +23,7 @@
     REPOS_DIR,
     STRIP_VARIANTS_LIST,
     REPO_DETAILS,
+    not_compatible_with,
 )
 
 if sys.version_info[0] == 2:
@@ -309,6 +310,14 @@
         self.run(self.repo_path, 'outgoing', self.clone_path)
 
 
+# https://bz.mercurial-scm.org/show_bug.cgi?id=5851
+# long timeout and process leak
+not_broken_hgweb = not_compatible_with(
+    revset="f0a851542a05::877185de62^",
+    filter_fn=lambda kwargs, current_version: kwargs['repo_type'] == 'http'
+)
+
+
 class DiscoveryTimeSuite(BaseExchangeTimeSuite):
     # debugdiscovery does not support revset argument
     params = BaseTestSuite.params + [
@@ -316,7 +325,9 @@
         STRIP_VARIANTS_LIST,
         [None]]
 
+    @params_as_kwargs
+    @not_broken_hgweb
     def time_debugdiscovery(self, *args, **kwargs):
         self.run(self.clone_path, 'debugdiscovery', self.repo_path,
                  expected_return_code=0)
 
@@ -319,7 +330,9 @@
     def time_debugdiscovery(self, *args, **kwargs):
         self.run(self.clone_path, 'debugdiscovery', self.repo_path,
                  expected_return_code=0)
 
+    @params_as_kwargs
+    @not_broken_hgweb
     def track_discovery_subset(self, *args, **kwargs):
         """Local repository is a subset of remote."""
         # self.hg() passes self.repo_path through --cwd, we override
@@ -328,6 +341,8 @@
                             '--repository', self.clone_path,
                             self.repo_path)
 
+    @params_as_kwargs
+    @not_broken_hgweb
     def track_discovery_superset(self, *args, **kwargs):
         """Local repository is a superset of remote."""
         return self.perfext('perfdiscovery', self.clone_path)