[SERVER-10825] mongod debug output when closing a batch of connections from Java API doesn't decrement number of connections Created: 19/Sep/13 Updated: 25/Jul/17 Resolved: 25/Jul/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Diagnostics, Networking |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Trivial - P5 |
| Reporter: | Keenon Werling | Assignee: | Henrik Edin |
| Resolution: | Done | Votes: | 0 |
| Labels: | connection | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Mac OS 10.8.3, Java 7 (1.7.0_40-b43), MongoDB 2.4.6, Tomcat 7.0.42 |
||
| Issue Links: |
|
||||||||
| Operating System: | OS X | ||||||||
| Sprint: | Platforms 2017-08-21 | ||||||||
| Participants: | |||||||||
| Description |
|
This isn't critical at all, just a heads up: I'm sharing a single MongoClient across every Servlet on my Tomcat webapp, as per documentation. I manage the MongoClient inside a ServletContextListener, which creates inside contextInitialized(), and closes inside contextDestroyed(). When I run Tomcat, repeatedly hit my servlet (which gets the MongoClient form getServletContext.getAttribute()), and then Ctrl+C the Tomcat instance when I'm done testing, the log output I get is: Thu Sep 19 11:24:47.045 [initandlisten] connection accepted from 127.0.0.1:49507 #37 (1 connection now open) You notice that the number of connections open doesn't decrement after the first close. It does reset on the next use, however, back to Thu Sep 19 11:36:47.538 [initandlisten] connection accepted from 127.0.0.1:49778 #46 (1 connection now open) etc. Didn't look at the source code, but this looks like a synchronization issue. Cheers, |
| Comments |
| Comment by Henrik Edin [ 25/Jul/17 ] |
|
Old issue and could not reproduce, closing as gone away. |
| Comment by Jeffrey Yemin [ 19/Sep/13 ] |
|
I'm going to move this to the SERVER project. |