<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:24:10 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-10825] mongod debug output when closing a batch of connections from Java API doesn&apos;t decrement number of connections</title>
                <link>https://jira.mongodb.org/browse/SERVER-10825</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;This isn&apos;t critical at all, just a heads up:&lt;/p&gt;

&lt;p&gt;I&apos;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().&lt;/p&gt;

&lt;p&gt;When I run Tomcat, repeatedly hit my servlet (which gets the MongoClient form getServletContext.getAttribute()), and then Ctrl+C the Tomcat instance when I&apos;m done testing, the log output I get is:&lt;/p&gt;

&lt;p&gt;Thu Sep 19 11:24:47.045 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 127.0.0.1:49507 #37 (1 connection now open)&lt;br/&gt;
Thu Sep 19 11:24:52.952 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 127.0.0.1:49508 #38 (2 connections now open)&lt;br/&gt;
Thu Sep 19 11:24:53.185 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 127.0.0.1:49509 #39 (3 connections now open)&lt;br/&gt;
Thu Sep 19 11:24:53.663 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 127.0.0.1:49518 #40 (4 connections now open)&lt;br/&gt;
Thu Sep 19 11:24:53.881 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 127.0.0.1:49520 #41 (5 connections now open)&lt;br/&gt;
Thu Sep 19 11:24:54.100 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 127.0.0.1:49521 #42 (6 connections now open)&lt;br/&gt;
Thu Sep 19 11:24:54.289 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 127.0.0.1:49522 #43 (7 connections now open)&lt;br/&gt;
Thu Sep 19 11:24:54.505 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 127.0.0.1:49523 #44 (8 connections now open)&lt;br/&gt;
Thu Sep 19 11:24:54.865 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 127.0.0.1:49524 #45 (9 connections now open)&lt;br/&gt;
Thu Sep 19 11:25:08.343 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn41&amp;#93;&lt;/span&gt; end connection 127.0.0.1:49520 (8 connections now open)&lt;br/&gt;
Thu Sep 19 11:25:08.343 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn43&amp;#93;&lt;/span&gt; end connection 127.0.0.1:49522 (8 connections now open)&lt;br/&gt;
Thu Sep 19 11:25:08.343 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn45&amp;#93;&lt;/span&gt; end connection 127.0.0.1:49524 (8 connections now open)&lt;br/&gt;
Thu Sep 19 11:25:08.343 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn44&amp;#93;&lt;/span&gt; end connection 127.0.0.1:49523 (8 connections now open)&lt;br/&gt;
Thu Sep 19 11:25:08.343 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn40&amp;#93;&lt;/span&gt; end connection 127.0.0.1:49518 (8 connections now open)&lt;br/&gt;
Thu Sep 19 11:25:08.343 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn39&amp;#93;&lt;/span&gt; end connection 127.0.0.1:49509 (8 connections now open)&lt;br/&gt;
Thu Sep 19 11:25:08.343 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn38&amp;#93;&lt;/span&gt; end connection 127.0.0.1:49508 (8 connections now open)&lt;br/&gt;
Thu Sep 19 11:25:08.343 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn42&amp;#93;&lt;/span&gt; end connection 127.0.0.1:49521 (8 connections now open)&lt;br/&gt;
Thu Sep 19 11:25:08.343 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn37&amp;#93;&lt;/span&gt; end connection 127.0.0.1:49507 (8 connections now open)&lt;/p&gt;

&lt;p&gt;You notice that the number of connections open doesn&apos;t decrement after the first close. It does reset on the next use, however, back to &lt;/p&gt;

&lt;p&gt;Thu Sep 19 11:36:47.538 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 127.0.0.1:49778 #46 (1 connection now open)&lt;br/&gt;
Thu Sep 19 11:36:53.030 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 127.0.0.1:49780 #47 (2 connections now open)&lt;/p&gt;

&lt;p&gt;etc.&lt;/p&gt;

&lt;p&gt;Didn&apos;t look at the source code, but this looks like a synchronization issue.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Keenon&lt;/p&gt;</description>
                <environment>Mac OS 10.8.3, Java 7 (1.7.0_40-b43), MongoDB 2.4.6, Tomcat 7.0.42</environment>
        <key id="90816">SERVER-10825</key>
            <summary>mongod debug output when closing a batch of connections from Java API doesn&apos;t decrement number of connections</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="5" iconUrl="https://jira.mongodb.org/images/icons/priorities/trivial.svg">Trivial - P5</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="henrik.edin@mongodb.com">Henrik Edin</assignee>
                                    <reporter username="keenon">Keenon Werling</reporter>
                        <labels>
                            <label>connection</label>
                    </labels>
                <created>Thu, 19 Sep 2013 18:40:09 +0000</created>
                <updated>Tue, 25 Jul 2017 20:18:07 +0000</updated>
                            <resolved>Tue, 25 Jul 2017 20:18:07 +0000</resolved>
                                                                    <component>Diagnostics</component>
                    <component>Networking</component>
                                        <votes>0</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="1631594" author="henrik.edin" created="Tue, 25 Jul 2017 20:18:07 +0000"  >&lt;p&gt;Old issue and could not reproduce, closing as gone away.&lt;/p&gt;</comment>
                            <comment id="428708" author="jeff.yemin" created="Thu, 19 Sep 2013 20:01:35 +0000"  >&lt;p&gt;I&apos;m going to move this to the SERVER project.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="192708">SERVER-17797</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 19 Sep 2013 20:01:35 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 29 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-719</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>henrik.edin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 29 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10021"><![CDATA[OS X]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>henrik.edin@mongodb.com</customfieldvalue>
            <customfieldvalue>jeff.yemin@mongodb.com</customfieldvalue>
            <customfieldvalue>keenon</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmg2n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hraejz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>104201</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1829">Platforms 2017-08-21</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hspax3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>