-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.2.2
-
Component/s: None
-
None
-
Environment:pymongo on linux
python 2.7
sharded db, multiple mongos
We are connecting to a db with an url like
mongodb://mongoservers.domain.com/db
where mongoservers.domain.com translates into many A records, each pointing to a different server having a mongos configured on the db.
If I the run a program that starts multiple threads using this db handle, some of them crash within find cursor with this message :
CursorNotFound: Cursor not found, cursor id: 45616940038
full traceback:
Traceback (most recent call last):
File "test_crash_pymongo.py", line 23, in query_airports
for a in airports:
File "/home/pythonenv/falcon/lib/python2.7/site-packages/pymongo/cursor.py", line 1090, in next
if len(self.__data) or self._refresh():
File "/home/pythonenv/falcon/lib/python2.7/site-packages/pymongo/cursor.py", line 1032, in _refresh
self.__max_await_time_ms))
File "/home/pythonenv/falcon/lib/python2.7/site-packages/pymongo/cursor.py", line 903, in __send_message
codec_options=self.__codec_options)
File "/home/pythonenv/falcon/lib/python2.7/site-packages/pymongo/helpers.py", line 114, in _unpack_response
raise CursorNotFound(msg, 43, errobj)
CursorNotFound: Cursor not found, cursor id: 45616940038
Attached is a demonstrator. The collection used here contains about 12000 records.
There is no problem if the url points to a single mongos.
- is related to
-
PYTHON-1110 Document that multihomed and round robin DNS names are not supported
- Closed
- related to
-
DRIVERS-201 Resolve names to all dns records (multiple dns A records)
- Closed