[JAVA-652] The connection to mongo db is not closed Created: 26/Sep/12 Updated: 28/Mar/13 Resolved: 28/Mar/13 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Connection Management |
| Affects Version/s: | 2.9.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Harshavardhan Konakanchi | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | replicaset | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows |
||
| Description |
|
The connection to the mongo DB server is not closed, when we are connecting to it using Replica server set. The java program is not terminated and I need to manually terminate the java program. The issue has been observed if we use replica server set only |
| Comments |
| Comment by auto [ 08/Jan/13 ] |
|
Author: {u'date': u'2012-10-09T01:28:03Z', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}Message: |
| Comment by auto [ 08/Jan/13 ] |
|
Author: {u'date': u'2012-10-09T01:28:03Z', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}Message: |
| Comment by auto [ 10/Oct/12 ] |
|
Author: {u'date': u'2012-10-08T18:28:03-07:00', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}Message: |
| Comment by Jeffrey Yemin [ 09/Oct/12 ] |
|
If anyone can test the release-2.9.x branch, I'd appreciate it. |
| Comment by auto [ 09/Oct/12 ] |
|
Author: {u'date': u'2012-10-08T18:28:03-07:00', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}Message: |
| Comment by Jerry Jerome [ 08/Oct/12 ] |
|
The 2.8.0 version of the Mongo driver appears to have corrected our problem. Open connections in our staging environment which is JBoss AS and JDK 6 are holding steady at around 15 versus the hundreds of open connections we were seeing before. Running locally I see only two that are left open from a scheduled app that is using the Quartz scheduler and the log for Mongo library. Thanks for your help. |
| Comment by Jeffrey Yemin [ 01/Oct/12 ] |
|
Please let me know either way. |
| Comment by Jerry Jerome [ 01/Oct/12 ] |
|
I'll try to replicate w/ the 2.8.0 version, but we're hoping that will fix it. |
| Comment by Jeffrey Yemin [ 01/Oct/12 ] |
|
Can you provide a small test program that reproduces this problem? The latter would be particularly useful, as my test programs all terminate as I would expect. If you're unable to do that, can you try to reproduce with 2.8.0? |
| Comment by Jerry Jerome [ 01/Oct/12 ] |
|
Is there an earlier version of the driver that does not have this problem? We are using a replica set w/ one slave and have an app we are trying to release to production that is getting an OutOfMemoryError due to this issue. |
| Comment by Jeffrey Yemin [ 27/Sep/12 ] |
|
Can you see what threads are still running in a debugger or with a thread dump? |
| Comment by Harshavardhan Konakanchi [ 27/Sep/12 ] |
|
I had tried using mongo.close() & DBTCPConnector.close() |
| Comment by Jeffrey Yemin [ 26/Sep/12 ] |
|
Are you calling the Mongo#close method? This will interrupt all the background threads. |