-
Type: Build Failure
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Python Drivers
-
Not Needed
-
macOS test failed with Too many open files
[2024/09/05 14:47:06.849] FAILURE: pymongo.errors.WriteError: 24: Too many open files, full error: {'index': 0, 'code': 264, 'errmsg': '24: Too many open files'} () [2024/09/05 14:47:06.849] self = <test.asynchronous.test_client_bulk_write.TestClientBulkWriteCRUD testMethod=test_collects_write_errors_across_batches_ordered> [2024/09/05 14:47:06.849] @async_client_context.require_version_min(8, 0, 0, -24) [2024/09/05 14:47:06.849] @async_client_context.require_no_serverless [2024/09/05 14:47:06.849] async def test_collects_write_errors_across_batches_ordered(self): [2024/09/05 14:47:06.849] listener = OvertCommandListener() [2024/09/05 14:47:06.849] client = await async_rs_or_single_client(event_listeners=[listener]) [2024/09/05 14:47:06.849] self.addAsyncCleanup(client.close) [2024/09/05 14:47:06.849] [2024/09/05 14:47:06.849] collection = client.db["coll"] [2024/09/05 14:47:06.849] self.addAsyncCleanup(collection.drop) [2024/09/05 14:47:06.849] await collection.drop() [2024/09/05 14:47:06.849] > await collection.insert_one(document={"_id": 1}) [2024/09/05 14:47:06.849] test/asynchronous/test_client_bulk_write.py:240: [2024/09/05 14:47:06.849] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2024/09/05 14:47:06.849] pymongo/asynchronous/collection.py:869: in insert_one [2024/09/05 14:47:06.849] await self._insert_one( [2024/09/05 14:47:06.849] pymongo/asynchronous/collection.py:809: in _insert_one [2024/09/05 14:47:06.849] await self._database.client._retryable_write( [2024/09/05 14:47:06.849] pymongo/asynchronous/mongo_client.py:1877: in _retryable_write [2024/09/05 14:47:06.849] return await self._retry_with_session(retryable, func, s, bulk, operation, operation_id) [2024/09/05 14:47:06.849] pymongo/asynchronous/mongo_client.py:1763: in _retry_with_session [2024/09/05 14:47:06.849] return await self._retry_internal( [2024/09/05 14:47:06.849] pymongo/_csot.py:110: in csot_wrapper [2024/09/05 14:47:06.849] return await func(self, *args, **kwargs) [2024/09/05 14:47:06.849] pymongo/asynchronous/mongo_client.py:1798: in _retry_internal [2024/09/05 14:47:06.849] return await _ClientConnectionRetryable( [2024/09/05 14:47:06.849] pymongo/asynchronous/mongo_client.py:2539: in run [2024/09/05 14:47:06.849] return await self._read() if self._is_read else await self._write() [2024/09/05 14:47:06.849] pymongo/asynchronous/mongo_client.py:2661: in _write [2024/09/05 14:47:06.849] return await self._func(self._session, conn, self._retryable) # type: ignore [2024/09/05 14:47:06.849] pymongo/asynchronous/collection.py:807: in _insert_command [2024/09/05 14:47:06.849] _check_write_command_response(result) [2024/09/05 14:47:06.849] pymongo/helpers_shared.py:285: in _check_write_command_response [2024/09/05 14:47:06.849] _raise_last_write_error(write_errors) [2024/09/05 14:47:06.849] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2024/09/05 14:47:06.849] write_errors = [{'code': 264, 'errmsg': '24: Too many open files', 'index': 0}] [2024/09/05 14:47:06.849] def _raise_last_write_error(write_errors: list[Any]) -> NoReturn: [2024/09/05 14:47:06.849] # If the last batch had multiple errors only report [2024/09/05 14:47:06.849] # the last error to emulate continue_on_error. [2024/09/05 14:47:06.849] error = write_errors[-1] [2024/09/05 14:47:06.849] if error.get("code") == 11000: [2024/09/05 14:47:06.849] raise DuplicateKeyError(error.get("errmsg"), 11000, error) [2024/09/05 14:47:06.849] > raise WriteError(error.get("errmsg"), error.get("code"), error) [2024/09/05 14:47:06.849] E pymongo.errors.WriteError: 24: Too many open files, full error: {'index': 0, 'code': 264, 'errmsg': '24: Too many open files'} [2024/09/05 14:47:06.849] pymongo/helpers_shared.py:256: WriteError
This could either be that mongod is mistakenly configured with ulimit too low or because we're leaking files in the test suite.
- is fixed by
-
PYTHON-4731 Explicitly close all MongoClients opened during tests
- Closed