We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
OOM error with master/slaves setup (zeromq, windows)
Hi !
 
### Describe the bug
An out of memory error occurs with ZeroMQ trying to allocate a crazy amount of memory in decoded_allocator, sometime up to several petabytes. This might very well be a ZeroMQ bug : 
` OUT OF MEMORY (bundled\zeromq\src\decoder_allocators.cpp:89)`
 
I added some logs and recompiled pyzmq to check what's going on. Upon further investigation, _max_counters seems to take a crazy value at some point. See [zmq_logs.txt](https://github.com/locustio/locust/files/4618065/zmq_logs.txt)
As you can see, allocator instance 0x0000016A9270F700 is constructed with _max_counters=249, but before crash its value has changed to 1557249601288, which causes a malloc of several terabytes.
 
 
### Steps to reproduce
Sorry, I couldn't find a surefire way to reproduce this one. It seems kind of random. It sometime happens before the test is even started, sometime when the test is stopped. Sometime it doesn't happen at all. It does seem to happen more often when stopping a test in the web UI. Simply run the ps1 attached and do some stuff in the web UI.
 
### Environment
 
- OS: Windows 10.0.18362.778
- Python version: 3.6
- Locust version: 0.14.6
- Locust files : [test_locust.zip](https://github.com/locustio/locust/files/4618016/test_locust.zip)
 
I managed to repro the bug on two computers : my work computer and my personal computer. Both are on Windows 10/Python 3.6 that comes with VS2017, but my personal computer has a pristine python environent, just ran pip install locustio.

Am I doing something I'm not supposed to ?


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 import ast
3 import os
4 import re
5 import sys
6 
7 from setuptools import find_packages, setup
8 
9 ROOT_PATH = os.path.abspath(os.path.dirname(__file__))
10 
11 # parse version from locust/__init__.py
12 _version_re = re.compile(r"__version__\s+=\s+(.*)")
13 _init_file = os.path.join(ROOT_PATH, "locust", "__init__.py")
14 with open(_init_file, "rb") as f:
15     version = str(ast.literal_eval(_version_re.search(f.read().decode("utf-8")).group(1)))
16 
17 setup(
18     name="locust",
19     version=version,
20     install_requires=[
21         "gevent>=20.9.0",
22         "flask>=2.0.0",
23         "Werkzeug>=2.0.0",
24         "requests>=2.9.1",
25         "msgpack>=0.6.2",
26         "pyzmq>=16.0.2",
27         "geventhttpclient>=1.4.4",
28         "ConfigArgParse>=1.0",
29         "psutil>=5.6.7",
30         "Flask-BasicAuth>=0.2.0",
31         "Flask-Cors>=3.0.10",
32         "roundrobin>=0.0.2",
33     ],
34     test_suite="locust.test",
35     tests_require=[
36         "cryptography",
37         "mock",
38         "pyquery",
39     ],
40     extras_require={
41         ":sys_platform == 'win32'": ["pywin32"],
42     },
43 )
44
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@
         "Werkzeug>=2.0.0",
         "requests>=2.9.1",
         "msgpack>=0.6.2",
-        "pyzmq>=16.0.2",
+        "pyzmq>=22.2.1",
         "geventhttpclient>=1.4.4",
         "ConfigArgParse>=1.0",
         "psutil>=5.6.7",

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -23,7 +23,7 @@\n         \"Werkzeug>=2.0.0\",\n         \"requests>=2.9.1\",\n         \"msgpack>=0.6.2\",\n-        \"pyzmq>=16.0.2\",\n+        \"pyzmq>=22.2.1\",\n         \"geventhttpclient>=1.4.4\",\n         \"ConfigArgParse>=1.0\",\n         \"psutil>=5.6.7\",\n", "issue": "OOM error with master/slaves setup (zeromq, windows)\nHi !\r\n \r\n### Describe the bug\r\nAn out of memory error occurs with ZeroMQ trying to allocate a crazy amount of memory in decoded_allocator, sometime up to several petabytes. This might very well be a ZeroMQ bug : \r\n` OUT OF MEMORY (bundled\\zeromq\\src\\decoder_allocators.cpp:89)`\r\n \r\nI added some logs and recompiled pyzmq to check what's going on. Upon further investigation, _max_counters seems to take a crazy value at some point. See [zmq_logs.txt](https://github.com/locustio/locust/files/4618065/zmq_logs.txt)\r\nAs you can see, allocator instance 0x0000016A9270F700 is constructed with _max_counters=249, but before crash its value has changed to 1557249601288, which causes a malloc of several terabytes.\r\n \r\n \r\n### Steps to reproduce\r\nSorry, I couldn't find a surefire way to reproduce this one. It seems kind of random. It sometime happens before the test is even started, sometime when the test is stopped. Sometime it doesn't happen at all. It does seem to happen more often when stopping a test in the web UI. Simply run the ps1 attached and do some stuff in the web UI.\r\n \r\n### Environment\r\n \r\n- OS: Windows 10.0.18362.778\r\n- Python version: 3.6\r\n- Locust version: 0.14.6\r\n- Locust files : [test_locust.zip](https://github.com/locustio/locust/files/4618016/test_locust.zip)\r\n \r\nI managed to repro the bug on two computers : my work computer and my personal computer. Both are on Windows 10/Python 3.6 that comes with VS2017, but my personal computer has a pristine python environent, just ran pip install locustio.\r\n\r\nAm I doing something I'm not supposed to ?\r\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport ast\nimport os\nimport re\nimport sys\n\nfrom setuptools import find_packages, setup\n\nROOT_PATH = os.path.abspath(os.path.dirname(__file__))\n\n# parse version from locust/__init__.py\n_version_re = re.compile(r\"__version__\\s+=\\s+(.*)\")\n_init_file = os.path.join(ROOT_PATH, \"locust\", \"__init__.py\")\nwith open(_init_file, \"rb\") as f:\n    version = str(ast.literal_eval(_version_re.search(f.read().decode(\"utf-8\")).group(1)))\n\nsetup(\n    name=\"locust\",\n    version=version,\n    install_requires=[\n        \"gevent>=20.9.0\",\n        \"flask>=2.0.0\",\n        \"Werkzeug>=2.0.0\",\n        \"requests>=2.9.1\",\n        \"msgpack>=0.6.2\",\n        \"pyzmq>=16.0.2\",\n        \"geventhttpclient>=1.4.4\",\n        \"ConfigArgParse>=1.0\",\n        \"psutil>=5.6.7\",\n        \"Flask-BasicAuth>=0.2.0\",\n        \"Flask-Cors>=3.0.10\",\n        \"roundrobin>=0.0.2\",\n    ],\n    test_suite=\"locust.test\",\n    tests_require=[\n        \"cryptography\",\n        \"mock\",\n        \"pyquery\",\n    ],\n    extras_require={\n        \":sys_platform == 'win32'\": [\"pywin32\"],\n    },\n)\n", "path": "setup.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\nimport ast\nimport os\nimport re\nimport sys\n\nfrom setuptools import find_packages, setup\n\nROOT_PATH = os.path.abspath(os.path.dirname(__file__))\n\n# parse version from locust/__init__.py\n_version_re = re.compile(r\"__version__\\s+=\\s+(.*)\")\n_init_file = os.path.join(ROOT_PATH, \"locust\", \"__init__.py\")\nwith open(_init_file, \"rb\") as f:\n    version = str(ast.literal_eval(_version_re.search(f.read().decode(\"utf-8\")).group(1)))\n\nsetup(\n    name=\"locust\",\n    version=version,\n    install_requires=[\n        \"gevent>=20.9.0\",\n        \"flask>=2.0.0\",\n        \"Werkzeug>=2.0.0\",\n        \"requests>=2.9.1\",\n        \"msgpack>=0.6.2\",\n        \"pyzmq>=22.2.1\",\n        \"geventhttpclient>=1.4.4\",\n        \"ConfigArgParse>=1.0\",\n        \"psutil>=5.6.7\",\n        \"Flask-BasicAuth>=0.2.0\",\n        \"Flask-Cors>=3.0.10\",\n        \"roundrobin>=0.0.2\",\n    ],\n    test_suite=\"locust.test\",\n    tests_require=[\n        \"cryptography\",\n        \"mock\",\n        \"pyquery\",\n    ],\n    extras_require={\n        \":sys_platform == 'win32'\": [\"pywin32\"],\n    },\n)\n", "path": "setup.py"}]}