<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:35:37 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-34120] scoped connection not being returned to the pool</title>
                <link>https://jira.mongodb.org/browse/SERVER-34120</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I have a replicaSet with two servers and I start getting this &quot;scoped connection not being returned to the pool&quot; when I upgraded to 3.6.3 in every 5 minute...&lt;/p&gt;

&lt;p&gt;My servers are setup with sync NTP and I m sure they have the sync time correctly&lt;/p&gt;

&lt;p&gt;ANY idea what it could cause this... Thank you&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:14:17.470+0000 I NETWORK  [thread7] Starting new replica set monitor for REP-1/server-1:27017,server-2:27017&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:14:17.476+0000 I NETWORK  [thread7] Successfully connected to server-1:27017 (9 connections now open to server-1:27017 with a 0 second timeout)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:14:17.478+0000 I NETWORK  [thread7] scoped connection to server-1:27017 not being returned to the pool&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:14:17.478+0000 I NETWORK  [thread7] Starting new replica set monitor for REP-1/server-1:27017,server-2:27017&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:14:17.483+0000 I NETWORK  [thread7] Successfully connected to server-1:27017 (10 connections now open to server-1:27017 with a 0 second timeout)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:14:17.485+0000 I NETWORK  [thread7] scoped connection to server-1:27017 not being returned to the pool&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:14:17.486+0000 I NETWORK  [thread7] Starting new replica set monitor for REP-1/server-1:27017,server-2:27017&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:14:17.490+0000 I NETWORK  [thread7] Successfully connected to server-1:27017 (11 connections now open to server-1:27017 with a 0 second timeout)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:14:17.493+0000 I NETWORK  [thread7] scoped connection to server-1:27017 not being returned to the pool&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:14:17.493+0000 I NETWORK  [thread7] Starting new replica set monitor for REP-1/server-1:27017,server-2:27017&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:14:17.497+0000 I NETWORK  [thread7] Successfully connected to server-1:27017 (12 connections now open to server-1:27017 with a 0 second timeout)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:14:17.500+0000 I NETWORK  [thread7] scoped connection to server-1:27017 not being returned to the pool&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:19:17.470+0000 I NETWORK  [thread7] Starting new replica set monitor for REP-1/server-1:27017,server-2:27017&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:19:17.476+0000 I NETWORK  [thread7] Successfully connected to server-1:27017 (13 connections now open to server-1:27017 with a 0 second timeout)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:19:17.478+0000 I NETWORK  [thread7] scoped connection to server-1:27017 not being returned to the pool&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:19:17.478+0000 I NETWORK  [thread7] Starting new replica set monitor for REP-1/server-1:27017,server-2:27017&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:19:17.483+0000 I NETWORK  [thread7] Successfully connected to server-1:27017 (14 connections now open to server-1:27017 with a 0 second timeout)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:19:17.485+0000 I NETWORK  [thread7] scoped connection to server-1:27017 not being returned to the pool&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:19:17.486+0000 I NETWORK  [thread7] Starting new replica set monitor for REP-1/server-1:27017,server-2:27017&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:19:17.490+0000 I NETWORK  [thread7] Successfully connected to server-1:27017 (15 connections now open to server-1:27017 with a 0 second timeout)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:19:17.493+0000 I NETWORK  [thread7] scoped connection to server-1:27017 not being returned to the pool&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:19:17.493+0000 I NETWORK  [thread7] Starting new replica set monitor for REP-1/server-1:27017,server-2:27017&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:19:17.498+0000 I NETWORK  [thread7] Successfully connected to server-1:27017 (16 connections now open to server-1:27017 with a 0 second timeout)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2018-03-24T18:19:17.500+0000 I NETWORK  [thread7] scoped connection to server-1:27017 not being returned to the pool&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</description>
                <environment></environment>
        <key id="516137">SERVER-34120</key>
            <summary>scoped connection not being returned to the pool</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="13201">Fixed</resolution>
                                        <assignee username="mira.carey@mongodb.com">Mira Carey</assignee>
                                    <reporter username="mmakroume">Mouhcine</reporter>
                        <labels>
                    </labels>
                <created>Sat, 24 Mar 2018 18:33:03 +0000</created>
                <updated>Mon, 8 Jan 2024 15:23:11 +0000</updated>
                            <resolved>Wed, 5 Sep 2018 14:34:22 +0000</resolved>
                                    <version>3.6.3</version>
                                    <fixVersion>3.6.8</fixVersion>
                    <fixVersion>4.0.3</fixVersion>
                    <fixVersion>4.1.3</fixVersion>
                                    <component>Networking</component>
                                        <votes>3</votes>
                                    <watches>20</watches>
                                                                                                                <comments>
                            <comment id="1994177" author="xgen-internal-githook" created="Wed, 5 Sep 2018 18:09:44 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jason Carey&apos;, &apos;email&apos;: &apos;jcarey@argv.me&apos;, &apos;username&apos;: &apos;hanumantmk&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34120&quot; title=&quot;scoped connection not being returned to the pool&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34120&quot;&gt;&lt;del&gt;SERVER-34120&lt;/del&gt;&lt;/a&gt; call done() in SessionsCollectionRS&lt;/p&gt;

&lt;p&gt;We make connections from the secondaries to the primary that we fail to&lt;br/&gt;
call done() on.  This causes those connections to fall out of the pool,&lt;br/&gt;
reducing connection pooling and producing worrisome log messages.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit fac4037c57431e3318e04cc850b9ea391ff5f19c)&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/46f73741d70dea240c5837c5d61edce729d38805&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/46f73741d70dea240c5837c5d61edce729d38805&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1994176" author="xgen-internal-githook" created="Wed, 5 Sep 2018 18:09:17 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jason Carey&apos;, &apos;email&apos;: &apos;jcarey@argv.me&apos;, &apos;username&apos;: &apos;hanumantmk&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34120&quot; title=&quot;scoped connection not being returned to the pool&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34120&quot;&gt;&lt;del&gt;SERVER-34120&lt;/del&gt;&lt;/a&gt; call done() in SessionsCollectionRS&lt;/p&gt;

&lt;p&gt;We make connections from the secondaries to the primary that we fail to&lt;br/&gt;
call done() on.  This causes those connections to fall out of the pool,&lt;br/&gt;
reducing connection pooling and producing worrisome log messages.&lt;/p&gt;

&lt;p&gt;(cherry picked from commit fac4037c57431e3318e04cc850b9ea391ff5f19c)&lt;br/&gt;
Branch: v3.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/baadc3aea5a6b178b7ef213c161c6688c78777ba&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/baadc3aea5a6b178b7ef213c161c6688c78777ba&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1993764" author="xgen-internal-githook" created="Wed, 5 Sep 2018 14:33:06 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jason Carey&apos;, &apos;email&apos;: &apos;jcarey@argv.me&apos;, &apos;username&apos;: &apos;hanumantmk&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-34120&quot; title=&quot;scoped connection not being returned to the pool&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-34120&quot;&gt;&lt;del&gt;SERVER-34120&lt;/del&gt;&lt;/a&gt; call done() in SessionsCollectionRS&lt;/p&gt;

&lt;p&gt;We make connections from the secondaries to the primary that we fail to&lt;br/&gt;
call done() on.  This causes those connections to fall out of the pool,&lt;br/&gt;
reducing connection pooling and producing worrisome log messages.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/fac4037c57431e3318e04cc850b9ea391ff5f19c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/fac4037c57431e3318e04cc850b9ea391ff5f19c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1988229" author="jason.carey" created="Tue, 28 Aug 2018 21:33:47 +0000"  >&lt;p&gt;After looking at the solution we pursued in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36332&quot; title=&quot;CursorNotFound error in GetMore on a secondary with sessions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36332&quot;&gt;&lt;del&gt;SERVER-36332&lt;/del&gt;&lt;/a&gt;, it looks like this won&apos;t be the fix. Bringing this back in to address directly&lt;/p&gt;</comment>
                            <comment id="1978807" author="jason.carey" created="Fri, 17 Aug 2018 15:16:47 +0000"  >&lt;p&gt;As part of the fix for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36332&quot; title=&quot;CursorNotFound error in GetMore on a secondary with sessions&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36332&quot;&gt;&lt;del&gt;SERVER-36332&lt;/del&gt;&lt;/a&gt;, we&apos;re intending to remove the code that&apos;s failing in this ticket (as well as making that codepath more robust in general).  Rather than this smaller fix, I&apos;ll close this out as a dupe when that tickets land (after verifying that it indeed solves the problem here)&lt;/p&gt;</comment>
                            <comment id="1964016" author="ranjeetblore@gmail.com" created="Thu, 2 Aug 2018 15:01:50 +0000"  >&lt;p&gt;I am using mongo version 3.6.5 and getting similar messages&#160; ....&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;018-08-02T09:55:39.808-0400 I NETWORK &lt;span class=&quot;error&quot;&gt;&amp;#91;thread64&amp;#93;&lt;/span&gt; Starting new replica set monitor for ReplicaSet/host1:27017,host2:27017,host3:27017&lt;br/&gt;
2018-08-02T09:55:39.820-0400 I NETWORK &lt;span class=&quot;error&quot;&gt;&amp;#91;thread64&amp;#93;&lt;/span&gt; Successfully connected to host3:27017 (10333 connections now open to host3:27017 with a 0 second timeout)&lt;br/&gt;
2018-08-02T09:55:39.823-0400 I NETWORK &lt;span class=&quot;error&quot;&gt;&amp;#91;thread64&amp;#93;&lt;/span&gt; scoped connection to host3:27017 not being returned to the pool&lt;br/&gt;
2018-08-02T09:55:39.823-0400 I NETWORK &lt;span class=&quot;error&quot;&gt;&amp;#91;thread64&amp;#93;&lt;/span&gt; Starting new replica set monitor for ReplicaSet/host1:27017,host2:27017,host3:27017&lt;br/&gt;
2018-08-02T09:55:39.844-0400 I NETWORK &lt;span class=&quot;error&quot;&gt;&amp;#91;thread64&amp;#93;&lt;/span&gt; Successfully connected to host3:27017 (10334 connections now open to host3:27017 with a 0 second timeout)&lt;br/&gt;
2018-08-02T09:55:39.846-0400 I NETWORK &lt;span class=&quot;error&quot;&gt;&amp;#91;thread64&amp;#93;&lt;/span&gt; scoped connection to host3:27017 not being returned to the pool&lt;br/&gt;
2018-08-02T09:55:39.846-0400 I NETWORK &lt;span class=&quot;error&quot;&gt;&amp;#91;thread64&amp;#93;&lt;/span&gt; Starting new replica set monitor for ReplicaSet/host1:27017,host2:27017,host3:27017&lt;br/&gt;
2018-08-02T09:55:39.865-0400 I NETWORK &lt;span class=&quot;error&quot;&gt;&amp;#91;thread64&amp;#93;&lt;/span&gt; Successfully connected to host3:27017 (10335 connections now open to host3:27017 with a 0 second timeout)&lt;br/&gt;
2018-08-02T09:55:39.867-0400 I NETWORK &lt;span class=&quot;error&quot;&gt;&amp;#91;thread64&amp;#93;&lt;/span&gt; scoped connection to host3:27017 not being returned to the pool&lt;br/&gt;
2018-08-02T09:55:39.869-0400 I NETWORK &lt;span class=&quot;error&quot;&gt;&amp;#91;thread64&amp;#93;&lt;/span&gt; Starting new replica set monitor for ReplicaSet/host1:27017,host2:27017,host3:27017&lt;br/&gt;
2018-08-02T09:55:39.878-0400 I NETWORK &lt;span class=&quot;error&quot;&gt;&amp;#91;thread64&amp;#93;&lt;/span&gt; Successfully connected to host3:27017 (10336 connections now open to host3:27017 with a 0 second timeout)&lt;br/&gt;
2018-08-02T09:55:39.880-0400 I NETWORK &lt;span class=&quot;error&quot;&gt;&amp;#91;thread64&amp;#93;&lt;/span&gt; scoped connection to host3:27017 not being returned to the pool&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="1963748" author="madhungowda6590@gmail.com" created="Thu, 2 Aug 2018 09:58:39 +0000"  >&lt;p&gt;I Have same issue in my environment.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;I&#160; just stopped the services and added some additional disk. restarted the services with new path after copying&#160; files to new disk.&lt;/p&gt;

&lt;p&gt;Some time after starting it is going to be shutdown.&lt;/p&gt;

&lt;p&gt;Logs here:&lt;/p&gt;

&lt;p&gt;Thu Aug 2 11:38:57.257 I NETWORK &lt;span class=&quot;error&quot;&gt;&amp;#91;thread10&amp;#93;&lt;/span&gt; Primary-one:27017 (88 connections now open to primary-one:27017 with a 0 second timeout)&lt;br/&gt;
Thu Aug 2 11:38:57.344 I NETWORK &lt;span class=&quot;error&quot;&gt;&amp;#91;thread10&amp;#93;&lt;/span&gt; scoped connection to primary-one:27017 not being returned to the pool&lt;br/&gt;
Thu Aug 2 11:40:32.577 I CONTROL &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; got signal 1 (Hangup), will terminate after current cmd ends&lt;br/&gt;
Thu Aug 2 11:40:32.578 I NETWORK &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; shutdown: going to close listening sockets...&lt;br/&gt;
Thu Aug 2 11:40:32.578 I NETWORK &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; removing socket file: /tmp/mongodb-27017.sock&lt;br/&gt;
Thu Aug 2 11:40:32.579 I REPL &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; shutdown: removing all drop-pending collections...&lt;br/&gt;
Thu Aug 2 11:40:32.579 I REPL &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; shutdown: removing checkpointTimestamp collection...&lt;br/&gt;
Thu Aug 2 11:40:32.579 I REPL &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; shutting down replication subsystems&lt;br/&gt;
Thu Aug 2 11:40:32.614 I FTDC &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; Shutting down full-time diagnostic data capture&lt;br/&gt;
Thu Aug 2 11:40:32.617 I STORAGE &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; WiredTigerKVEngine shutting down&lt;br/&gt;
Thu Aug 2 11:40:33.269 I STORAGE &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; WiredTiger message &lt;span class=&quot;error&quot;&gt;&amp;#91;1533202833:269028&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;16758:0x7ff0f7523700&amp;#93;&lt;/span&gt;, txn-recover: Main recovery loop: starting at 14/21376&lt;br/&gt;
Thu Aug 2 11:40:33.521 I STORAGE &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; WiredTiger message &lt;span class=&quot;error&quot;&gt;&amp;#91;1533202833:521737&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;16758:0x7ff0f7523700&amp;#93;&lt;/span&gt;, txn-recover: Recovering log 14 through 15&lt;br/&gt;
Thu Aug 2 11:40:33.656 I STORAGE &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; WiredTiger message &lt;span class=&quot;error&quot;&gt;&amp;#91;1533202833:656274&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;16758:0x7ff0f7523700&amp;#93;&lt;/span&gt;, txn-recover: Recovering log 15 through 15&lt;br/&gt;
Thu Aug 2 11:40:33.733 I STORAGE &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; WiredTiger message &lt;span class=&quot;error&quot;&gt;&amp;#91;1533202833:733967&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;16758:0x7ff0f7523700&amp;#93;&lt;/span&gt;, txn-recover: Set global recovery timestamp: 0&lt;br/&gt;
Thu Aug 2 11:40:34.308 I NETWORK &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; end connection server:65304 (6 connections now open)&lt;br/&gt;
Thu Aug 2 11:40:34.677 I STORAGE &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; shutdown: removing fs lock...&lt;br/&gt;
Thu Aug 2 11:40:34.677 I CONTROL &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; now exiting&lt;br/&gt;
Thu Aug 2 11:40:34.677 I CONTROL &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; shutting down with code:0&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Did we find any fix for this?!&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Best Regards&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="1928172" author="jason.carey" created="Thu, 21 Jun 2018 20:30:53 +0000"  >&lt;p&gt;After looking a bit, I believe this is actually related to some of the Logical Sessions code introduced in 3.6.&lt;/p&gt;

&lt;p&gt;Following the repro (spinning up a minimal 3 node replset) and watching the logs, threads with the name &quot;threadN&quot; pop up with similar warnings.  Attaching gdb showed these to be PeriodicRunnerASIO threads running background tasks for the logical sessions refresh.&lt;/p&gt;

&lt;p&gt;The relevant code lives at: &lt;a href=&quot;https://github.com/mongodb/mongo/blob/6b881b87191c33ab14a115a11ab478bffe93621c/src/mongo/db/sessions_collection_rs.cpp#L116-L125&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;sessions_collection_rs.cpp&lt;/a&gt;&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;template&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;typename&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; Callback&amp;gt;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;auto sendToPrimary(OperationContext* opCtx, Callback callback)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    -&amp;gt; decltype(std::declval&amp;lt;Callback&amp;gt;()(&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;static_cast&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&amp;lt;DBClientBase*&amp;gt;(nullptr))) {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    boost::optional&amp;lt;ScopedDbConnection&amp;gt; conn;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    auto res = makePrimaryConnection(opCtx, &amp;amp;conn);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; (!res.isOK()) {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; res;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; callback(conn-&amp;gt;get());&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;The mistake we&apos;re making is in not calling done() on the connection before letting the ScopedDbConnection go out of scope.  When connects are returned in that way, we don&apos;t know their status, so we have to toss them.  Calling done() fixes the problem and uses pooled connections for these operations.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;I don&apos;t believe this is a critical operational issue.  That codepath does clean up those connections (we don&apos;t leak them), we just lose track of some book keeping.  Definitely worth fixing, but probably not a cause of production instability&lt;/p&gt;</comment>
                            <comment id="1892496" author="erik.wramner" created="Wed, 16 May 2018 06:49:52 +0000"  >&lt;p&gt;The servers haven&apos;t crashed since I wrote the comment. I will create a new ticket on the next crash. I upgraded all packages (yum upgrade) and rebooted the servers last time, so perhaps that helped? However, the noise in the logs about connections not being returned to the pool with ever increasing numbers of connections &quot;now open&quot; is still there.&lt;/p&gt;</comment>
                            <comment id="1889046" author="thomas.schubert" created="Fri, 11 May 2018 13:40:07 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=erik.wramner&quot; class=&quot;user-hover&quot; rel=&quot;erik.wramner&quot;&gt;erik.wramner&lt;/a&gt;, would you please open a new SERVER ticket for the issue that you describe? It would be helpful for us to see the mongod logs and an archive of diagnostic.data directory of the mongod that is crashing.&lt;/p&gt;

&lt;p&gt;Thank you,&lt;br/&gt;
Kelsey&lt;/p&gt;</comment>
                            <comment id="1888895" author="erik.wramner" created="Fri, 11 May 2018 07:45:52 +0000"  >&lt;p&gt;We are getting this on 3.6.4-1 on CentOS 7 kernel 3.10.0-693.21.1.el7.x86_64 in Azure. As far as I can determine we had it with 3.6.2 as well. Starting recently we also have regular server crashes where the mongod process dies without any clear reason on at least a daily basis. I don&apos;t know if it is related in any way, but apart from the sudden death this is what I can find in the logs. We have three servers in the replica set and the logs are just like the ones above. I would be very interested in getting this fixed.&lt;/p&gt;</comment>
                            <comment id="1844945" author="mmakroume" created="Mon, 26 Mar 2018 14:12:13 +0000"  >&lt;p&gt;Hello Ramon, &lt;br/&gt;
I just uploaded the logs for the primary and the two secondaries. I upgraded from version 3.6.2 to 3.6.3 and this never happened before in my system test. &lt;br/&gt;
 &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/attachment/182669/182669_primary.txt&quot; title=&quot;primary.txt attached to SERVER-34120&quot;&gt;primary.txt&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.mongodb.org/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;  &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/attachment/182667/182667_secondary-1.txt&quot; title=&quot;secondary-1.txt attached to SERVER-34120&quot;&gt;secondary-1.txt&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.mongodb.org/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;  &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/attachment/182668/182668_secondary-2.txt&quot; title=&quot;secondary-2.txt attached to SERVER-34120&quot;&gt;secondary-2.txt&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.mongodb.org/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt; Thank you for your time and help.&lt;br/&gt;
Note: MongoDB is running on ubuntu 16.04 servers on AWS.&lt;br/&gt;
Mouhcine&lt;/p&gt;</comment>
                            <comment id="1844853" author="ramon.fernandez" created="Mon, 26 Mar 2018 12:30:57 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mmakroume&quot; class=&quot;user-hover&quot; rel=&quot;mmakroume&quot;&gt;mmakroume&lt;/a&gt;, these messages are informational; they indicate that a connection cannot be reused and is being terminated. What version did you upgrade from?&lt;/p&gt;

&lt;p&gt;Also it would be good to see more details from both nodes, to see if they provide a clue as of to why this is happening. Can you please upload logs for both nodes in your replica set spanning enough time to show multiple incidents of these messages?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Ram&#243;n.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="577725">SERVER-36332</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="516384">SERVER-34124</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="597325">SERVER-36923</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="182669" name="primary.txt" size="34567" author="mmakroume" created="Mon, 26 Mar 2018 14:13:10 +0000"/>
                            <attachment id="182667" name="secondary-1.txt" size="16244" author="mmakroume" created="Mon, 26 Mar 2018 14:12:05 +0000"/>
                            <attachment id="182668" name="secondary-2.txt" size="18887" author="mmakroume" created="Mon, 26 Mar 2018 14:12:05 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>13.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="15640"><![CDATA[v4.0]]></customfieldvalue>
    <customfieldvalue key="15141"><![CDATA[v3.6]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[500A000000auyVYIAY, 500A000000bVLOmIAO, 500A000000bViEDIA0, 500A000000bwwzOIAQ, 5002K00000csGHRQA2, 5002K00000kCCPuQAO, 5002K00000pEOcOQAW, 5002K00000qceNjQAI, 5002K00000vgPsIQAU]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 26 Mar 2018 12:30:57 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 23 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-36332'>SERVER-36332</a></s>]]></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-1237</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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 23 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>erik.wramner</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>kelsey.schubert@mongodb.com</customfieldvalue>
            <customfieldvalue>madhungowda6590@gmail.com</customfieldvalue>
            <customfieldvalue>mira.carey@mongodb.com</customfieldvalue>
            <customfieldvalue>mmakroume</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
            <customfieldvalue>ranjeetblore@gmail.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htth5r:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</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="2369">Platforms 2018-07-02</customfieldvalue>
    <customfieldvalue id="2370">Platforms 2018-07-16</customfieldvalue>
    <customfieldvalue id="2371">Platforms 2018-07-30</customfieldvalue>
    <customfieldvalue id="2449">Platforms 2018-08-13</customfieldvalue>
    <customfieldvalue id="2480">Platforms 2018-09-10</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|htt3dj:</customfieldvalue>

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