-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Docs
-
None
Summary: The Pymongo client seems to be causing a deadlock when `.close()` is called:
Environment:
- 3.8.12 (default, Jan 15 2022, 18:39:47) [GCC 7.5.0]
- Pymongo version: 4.1.1
- Pymongo has c: True
Description:
We've found that any of our scripts that use a utility to wrap a pymongo class won't exit properly. They hang in a deadlock. Ultimately getting stuck trying to restart a monitor thread here.
We've found this started happening for us when upgrading from python 3.6.9 to 3.8.12. We've also found this happens for any python 3.9.* or 3.8.*.
Impact on us:
This is preventing our company from upgrading from python 3.6.9 which is blocking features we would like to release.
Attached script instructions:
- Follow the instructions here to install a mongodb server.
- In a python environment install the attached `pip_deps.txt` list.
- Run `python example_for_mongo.py`.
- Watch the script get stuck in deadlock.
- is related to
-
PYTHON-3193 Add ResourceWarning for unclosed MongoClients in __del__
- Closed