[SERVER-10949] dropDatabase() seems to be killing my connection Edit Created: 27/Sep/13 Updated: 10/Dec/14 Resolved: 19/Mar/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking, Stability |
| Affects Version/s: | 2.4.6 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tito Ciuro | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Mac OS X 10.8.4, Node 0.10.16, MongoDB 2.4.6 |
||
| Operating System: | OS X | |||||||
| Steps To Reproduce: | Adding this snippet to my app breaks all hell loose:
I'm only deleting one database and then this issue happens. If I leave the above snippet out, it all works like a charm. |
|||||||
| Participants: |
| Description |
|
Hello, I have the following setup: Node v0.10.16 I'm experiencing something really odd with MongoDB's connection and Node: once I issue a dropDatabase command from my Node app, the connection drops from 5 to 0 and MongoDB becomes pretty much useless. Here's the output I see:
From this moment on, the requests "hang" and never come back. I see this with find() and findOne(). What's strange is that even with the auto_reconnect option, MongoDB tries to reopen the connection every ~1 minute but then loses them:
The connection pool is set to 5, but I only see 3 being opened (and then quickly closed) once the dropDatabase() problem has occurred. If I remove the section that performs the dropDatabase, it all works fine:
The other thing I find odd is that I don't see an exception being raised or any type of error. It's a complete silent failure. Any ideas? Thanks in advance. |
| Comments |
| Comment by Stennie Steneker (Inactive) [ 19/Mar/14 ] | |||||||||||
|
Hi Tito, Please be advised I'm now closing this issue as we have been unable to reproduce the reported problem. If you do have any further information that would help us reproduce this issue (as per the last questions from Luke), please let us know. Thanks, | |||||||||||
| Comment by Luke Lovett [ 05/Nov/13 ] | |||||||||||
|
Hi Tito, I'm trying something similar to the code you've provided, but all databases are being dropped for me without loss of connection.
Are you running mongod as a standalone or as part of a larger system (replica set/sharded cluster)? You might find try to probe the logs a bit more by increasing the verbosity of mongod using the -v(vvvv) flag. If this is still a problem for you, could you try uploading the verbose server logs? We can go from there. Thanks! | |||||||||||
| Comment by Tito Ciuro [ 27/Sep/13 ] | |||||||||||
|
I should add that I'm connecting to MongoDB using mongo-native. The connection to MongoDB is performed via MongoClient: var mongoDBConnector = new MongoClient(new Server(host, port, { Everything works just fine until I issue a db.dropDatabase(). |