pymongo.errors.CursorNotFound
traceback error on prod prozorro-prod-registry-mirror-api-7c5888f495-psq5m
[2021-10-27T12:40:23.362Z] | aiohttp.server | ERROR - Error handling request | X-Request-ID: 7ca61e4c5179c1866d58d79c2e5fa5f6
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/local/lib/python3.8/site-packages/prozorro_sale/tools/middlewares.py", line 9, in request_id_middleware
response = await handler(request)
File "/usr/local/lib/python3.8/site-packages/prozorro_sale/auth/__init__.py", line 114, in context_middleware
return await handler(request)
File "/usr/local/lib/python3.8/site-packages/prozorro_sale/auth/__init__.py", line 134, in handler
return await func(request, *args, **kwargs)
File "/registry_mirror/registry_mirror/main.py", line 44, in websocket_handler
if await job:
File "/usr/local/lib/python3.8/site-packages/mongodb_mirror/mirror.py", line 67, in sync_client
return await self._initial_sync(client)
File "/usr/local/lib/python3.8/site-packages/mongodb_mirror/mirror.py", line 167, in _initial_sync
async for doc in self._mongo[db][collection].find(collection_filter).sort('dateModified', 1):
File "/usr/local/lib/python3.8/site-packages/motor/core.py", line 1114, in next
if self.alive and (self._buffer_size() or await self._get_more()):
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.8/site-packages/pymongo/cursor.py", line 1175, in _refresh
self.__send_message(g)
File "/usr/local/lib/python3.8/site-packages/pymongo/cursor.py", line 1044, in __send_message
response = client._run_operation(
File "/usr/local/lib/python3.8/site-packages/pymongo/mongo_client.py", line 1424, in _run_operation
return self._retryable_read(
File "/usr/local/lib/python3.8/site-packages/pymongo/mongo_client.py", line 1525, in _retryable_read
return func(session, server, sock_info, secondary_ok)
File "/usr/local/lib/python3.8/site-packages/pymongo/mongo_client.py", line 1420, in _cmd
return server.run_operation(
File "/usr/local/lib/python3.8/site-packages/pymongo/server.py", line 130, in run_operation
_check_command_response(first, sock_info.max_wire_version)
File "/usr/local/lib/python3.8/site-packages/pymongo/helpers.py", line 165, in _check_command_response
raise CursorNotFound(errmsg, code, response, max_wire_version)
pymongo.errors.CursorNotFound: cursor id 6779269152065884777 not found, full error: {'operationTime': Timestamp(1635338421, 1), 'ok': 0.0, 'errmsg': 'cursor id 6779269152065884777 not found', 'code': 43, 'codeName': 'CursorNotFound', '$clusterTime': {'clusterTime': Timestamp(1635338421, 1), 'signature': {'hash': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 'keyId': 0}}}