Anyone having problems with a supported 10Gen C # driver

I see a ton of these errors

"An existing connection was forcibly closed by the remote host"

in the Mongo log since I switched from an open source C # driver to a supported 10Gen. As soon as this error happens, my sites stop responding. I have a feeling that it has something to do with how pooling is implemented. See Log below, I remove indexes from the collection by deleting all the elements, then "recreating" the collection, adding all the rows I need and then indexing the collection. A few minutes after that, I always get the error: "An existing connection was forcibly closed by the remote host"

[conn46] run command admin.$cmd { ismaster: 1 } [conn46] query admin.$cmd ntoreturn:1 command: { ismaster: 1 } reslen:64 0ms [conn46] query BtSearchCache.system.indexes reslen:1407 nreturned:7 0ms drop indexes [conn46] run command BtSearchCache.$cmd { deleteIndexes: "Board_41", index: "ix_QuickSearch" } [conn46] CMD: dropIndexes BtSearchCache.Board_41 [conn46] dropIndexes: ix_QuickSearch not found [conn46] query BtSearchCache.$cmd ntoreturn:1 command: { deleteIndexes: "Board_41", index: "ix_QuickSearch" } reslen:81 1ms remove all data from collection [conn46] remove query: {} 1428ms insert data (thousands of rows, omitted here) [conn46] insert BtSearchCache.Board_41 0ms [conn46] insert BtSearchCache.Board_41 0ms [conn46] insert BtSearchCache.Board_41 1ms [conn46] insert BtSearchCache.Board_41 0ms [conn46] insert BtSearchCache.system.indexes 0ms create indexes [conn46] run command admin.$cmd { getlasterror: 1 } [conn46] query admin.$cmd ntoreturn:1 command: { getlasterror: 1 } reslen:65 0ms ERROR a few minutes later [conn46] MessagingPort recv() errno:10054 An existing connection was forcibly closed by the remote host. 192.168.100.216:51111 [conn46] SocketException: 9001 socket exception [conn46] end connection 192.168.100.216:51111 
+4
source share
2 answers

Follow-up report: This question was also asked in the mongodb user group on Google, and most discussions took place there. In the end, we found out that a particular request caused the mongo server to crash (the bug has already been fixed in current versions of the server), and the C # driver simply reported connection failures. This was not a bug in the C # driver, and the driver did not require a fix. The C # driver will reconnect after server recovery.

+3
source

I do not know why this is so, but I know that you need to restart the application to fix this problem. And this error always occurs when you restart mongodb. So after each restart of mongo db you need to restart the application (I assume you are usigng iis).

If you know about mongo vue , this tool also cannot connect to mongodb when mongovue was restarted.

Hope this helps solve the problem.

+1
source

Source: https://habr.com/ru/post/1333485/


All Articles