-
Type: Task
-
Resolution: Works as Designed
-
Priority: Unknown
-
None
-
Affects Version/s: 2.1
-
Component/s: asyncio
-
None
-
Environment:python 3.7.5
pymongo 3.12.0
# 1.runtime_mongos is settings of "replicaSet": "bapi", "readPreference": "secondaryPreferred" # 2.I run the flow test, found the mem_usage increase a lot.(1.428GiB / 8GiB) the db has about 10+M data. table = motor_asyncio.AsyncIOMotorClient(**settings.runtime_mongos)["name"]["Table"] loop = asyncio.get_event_loop() async def test(): cnt = 0 while True: task_ls = await table.find().sort([ (cls.COL_PRIORITY, pymongo.ASCENDING), (cls.COL_START_UTS, pymongo.ASCENDING), ]).to_list(None) print(len(task_ls)) await asyncio.sleep(1) cnt += 1 if cnt > 50: gc.collect() cnt = 0 loop.run_until_complete(test())
I have no idea what happen.
- related to
-
PYTHON-2861 Add documentation snippets warning against Cursor anti-patterns
- Closed