<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:38:28 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>[GODRIVER-2390] repeated listCollections &amp; collStats causing connection disconnect</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2390</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;The Cloud InTel team has a feature called Data Explorer which uses the automation agent to send commands down to the mongod. When this feature runs on an evergreen box with a standalone mongod 4.2 (mostly fails on a 4.2 standalone but once in a while also fails on newer versions of mongodb and even on a replica set) and an automation agent (which uses a go driver version v1.7.2-0.20210804202952-82d3467025bc) it ends up causing the agent to lose its connection to the mongod when it issues particular commands.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Specifically, we end up populating the mongod with many databases and collections via a js script, then the agent iterates through all of the dbs and for each db it calls listCollections on the mongod. Sometimes one of those listCollections ends up failing due to a closed connection. In the situations when the listCollections end up finishing however, we then take the first db in the list and we call collStats on each of its collections and one of those collStats calls sometimes ends up failing, also due to a closed connection. The failures occur 10 - 15% of the time that the test runs and most of those are failures on listCollections. The relevant automation agent and mongod logs are attached.&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;

&lt;p&gt;I have not been able to reproduce this locally. It seems to only fail on the evergreen boxes where we run e2e tests (which might imply this is OS specific or maybe it only occurs when resource usage on a box is high?). Here is an example of one of the failed evergreen e2e tests: &lt;a href=&quot;https://spruce.mongodb.com/task/mms_e2e_local_E2E_Local_Monitoring_DataExplorer_Read_Write_patch_c8ef0b4e6e5e627d655dd527362adb8d05a7d02f_624b0c86e3c33127d0d804db_22_04_04_15_19_37/tests?execution=0&amp;amp;sortBy=STATUS&amp;amp;sortDir=ASC&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://spruce.mongodb.com/task/mms_e2e_local_E2E_Local_Monitoring_DataExplorer_Read_Write_patch_c8ef0b4e6e5e627d655dd527362adb8d05a7d02f_624b0c86e3c33127d0d804db_22_04_04_15_19_37/tests?execution=0&amp;amp;sortBy=STATUS&amp;amp;sortDir=ASC&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The test doesn&apos;t spin up any Atlas boxes, it simply runs an agent and a standalone on the current evergreen box.&#160;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;AdditionalBackground&quot;&gt;&lt;/a&gt;Additional Background&lt;/h4&gt;

&lt;p&gt;Here is the relevant snippet from the automation agent log of that failing test where it shows the listCollections command failing due to a closed connection:&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;[2022-04-21T00:27:49.230+0000] [.debug] [src/mongoctl/processctl.go:RunCommandWithTimeout:1132] &amp;lt;myStandalone&amp;gt; [00:27:49.230] Starting RunCommand(dbName=admin, cmd=[\{isMaster 1}]) to ip-10-122-63-219.ec2.internal:20100 (local=false) ...&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;[2022-04-21T00:27:49.230+0000] [.debug] [src/mongoclientservice/mongoclientservice.go:createClient:1129] [00:27:49.230] Attempting to connect to connParams = ip-10-122-63-219.ec2.internal:20100 (local=false), connectMode = SingleConnect, deadline = 2022-04-21 00:28:29.230260107 +0000 UTC m=+142.651182497, omitAtmUsers = false identitiesToTry: ([&amp;lt;nil&amp;gt;]), tryTls order: ([false])&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;[2022-04-21T00:27:49.230+0000] [.debug] [src/mongoclientservice/mongoclientservice.go:createClient:1186] [00:27:49.230] Trying without TLS for ip-10-122-63-219.ec2.internal:20100 (local=false). identity &amp;lt;nil&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;[2022-04-21T00:27:49.230+0000] [.error] [src/mongoctl/processctl.go:runListCollections:2881] [00:27:49.230] Error running ListCollections with filter map[] : connection(ip-10-122-63-219.ec2.internal:20100[-79]) incomplete read of message header: read tcp 10.122.63.219:54110-&amp;gt;10.122.63.219:20100: use of closed network connection&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;[2022-04-21T00:27:49.230+0000] [.error] [src/mongoctl/processctl.go:func1:2833] [00:27:49.230] Error getting collections for db config : [00:27:49.230] Error running ListCollections with filter map[] : connection(ip-10-122-63-219.ec2.internal:20100[-79]) incomplete read of message header: read tcp 10.122.63.219:54110-&amp;gt;10.122.63.219:20100: use of closed network connection&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;[2022-04-21T00:27:49.230+0000] [.debug] [src/cachingresolver/cachingresolver.go:virtualDnsServerMainLoop:72] &amp;lt;Virtual DNS Server 204&amp;gt; [00:27:49.230] Started Virtual DNS Server 204&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;[2022-04-21T00:27:49.230+0000] [.error] [src/mongoctl/processctl.go:getCollectionsHelper:2861] [00:27:49.230] Error getting collections for db config : [00:27:49.230] Error executing WithClientFor() for cp=ip-10-122-63-219.ec2.internal:20100 (local=false) connectMode=SingleConnect identityUsed=&amp;lt;nil&amp;gt; : [00:27:49.230] Error getting collections for db config : [00:27:49.230] Error running ListCollections with filter map[] : connection(ip-10-122-63-219.ec2.internal:20100[-79]) incomplete read of message header: read tcp 10.122.63.219:54110-&amp;gt;10.122.63.219:20100: use of closed network connection&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;And here is the corresponding mongod log:&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;2022-04-21T00:27:49.230+0000 D2 COMMAND [conn81] run command config.$cmd { listCollections: 1, filter: {}, nameOnly: true, cursor: {}, lsid: { id: UUID(&quot;61e7ec1e-9a4f-4132-bfc1-908c938e3c31&quot;) }, $db: &quot;config&quot; }&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;2022-04-21T00:27:49.230+0000 D2 NETWORK [conn80] Session from 10.122.63.219:54108 encountered a network error during SourceMessage: HostUnreachable: Connection closed by peer&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;2022-04-21T00:27:49.230+0000 D2 NETWORK [conn79] Session from 10.122.63.219:54106 encountered a network error during SourceMessage: HostUnreachable: Connection closed by peer&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;2022-04-21T00:27:49.230+0000 I COMMAND [conn81] command config.$cmd appName: &quot;MongoDB Automation Agent v12.0.0.7500 (git: 4b476d0c841cee05d8e870a4264ab1106c9ed903)&quot; command: listCollections { listCollections: 1, filter: {}, nameOnly: true, cursor: {}, lsid: { id: UUID(&quot;61e7ec1e-9a4f-4132-bfc1-908c938e3c31&quot;) }, $db: &quot;config&quot; } numYields:0 reslen:171 locks:{ ParallelBatchWriterMode: { acquireCount:&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;{ r: 1 }&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;}, ReplicationStateTransition: { acquireCount:&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;{ w: 1 }&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;}, Global: { acquireCount:&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;{ r: 1 }&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;}, Database: { acquireCount:&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;{ r: 1 }&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;}, Collection: { acquireCount:&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;{ r: 2 }&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;}, Mutex: { acquireCount:&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;{ r: 1 }&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;} } protocol:op_msg 0ms&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;2022-04-21T00:27:49.230+0000 I NETWORK [conn79] end connection 10.122.63.219:54106 (16 connections now open)&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;2022-04-21T00:27:49.230+0000 I NETWORK [conn80] end connection 10.122.63.219:54108 (17 connections now open)&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;2022-04-21T00:27:49.230+0000 D3 NETWORK [conn79] Cancelling outstanding I/O operations on connection to 10.122.63.219:54106&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;2022-04-21T00:27:49.230+0000 D2 NETWORK [conn82] Session from 10.122.63.219:54120 encountered a network error during SourceMessage: HostUnreachable: Connection closed by peer&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;2022-04-21T00:27:49.230+0000 D3 NETWORK [conn80] Cancelling outstanding I/O operations on connection to 10.122.63.219:54108&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;2022-04-21T00:27:49.230+0000 I NETWORK [conn82] end connection 10.122.63.219:54120 (15 connections now open)&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;2022-04-21T00:27:49.230+0000 D3 NETWORK [conn82] Cancelling outstanding I/O operations on connection to 10.122.63.219:54120&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;2022-04-21T00:27:49.230+0000 D2 NETWORK [conn81] Session from 10.122.63.219:54110 encountered a network error during SourceMessage: HostUnreachable: Connection closed by peer&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;2022-04-21T00:27:49.230+0000 I NETWORK [conn81] end connection 10.122.63.219:54110 (14 connections now open)&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;2022-04-21T00:27:49.230+0000 D3 NETWORK [conn81] Cancelling outstanding I/O operations on connection to 10.122.63.219:54110&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;&#160;&lt;/p&gt;

&lt;p&gt;Here is a link to the code that is being called which ends up failing due to a disconnect:&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/mms-automation/blob/745524a911e35371fd2258183ec36adc2f1aaf41/go_planner/src/com.tengen/cm/mongoctl/processctl.go#L2878&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mms-automation/blob/745524a911e35371fd2258183ec36adc2f1aaf41/go_planner/src/com.tengen/cm/mongoctl/processctl.go#L2878&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;br/&gt;
I noticed this in the listCollections docs page:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Client Disconnection&lt;br/&gt;
Starting in MongoDB 4.2, if the client that issued&#160;&lt;tt&gt;listCollections&lt;/tt&gt;&#160;disconnects before the operation completes, MongoDB marks&#160;&lt;tt&gt;listCollections&lt;/tt&gt;&#160;for termination using&#160;&lt;tt&gt;killOp&lt;/tt&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;While it doesn&apos;t sound like this would cause a disconnect, it is odd that we are seeing these errors mostly on version 4.2 (and once in a while on a higher version, but never on earlier versions). Maybe before 4.2 the disconnect was always an issue but the driver would reconnect and still be able to get the results of the listCollections command whereas after 4.2 it can&apos;t?&lt;br/&gt;
&#160;&lt;br/&gt;
This docs page also mentions a few changes that were made to collStats starting in version 4.2: &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/command/collStats/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.mongodb.com/docs/manual/reference/command/collStats/&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2031420">GODRIVER-2390</key>
            <summary>repeated listCollections &amp; collStats causing connection disconnect</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</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="preston.vasquez@mongodb.com">Preston Vasquez</assignee>
                                    <reporter username="vladimir.isakov@mongodb.com">Vladimir Isakov</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Apr 2022 19:29:02 +0000</created>
                <updated>Mon, 13 Jun 2022 21:06:58 +0000</updated>
                            <resolved>Mon, 13 Jun 2022 21:06:58 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="4612798" author="JIRAUSER1265158" created="Mon, 13 Jun 2022 21:06:58 +0000"  >&lt;p&gt;The Go Driver team is fairly confident that bumping to Version &amp;gt; 1.9 will resolve the disconnects when running the &lt;tt&gt;ListCollections&lt;/tt&gt; operation.  Closing with the understanding that a new ticket may be required if these issue persist after version bump.&lt;/p&gt;</comment>
                            <comment id="4600554" author="vladimir.isakov" created="Tue, 7 Jun 2022 20:10:44 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=preston.vasquez%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;preston.vasquez@mongodb.com&quot;&gt;preston.vasquez@mongodb.com&lt;/a&gt; fyi... the Automation team will be upgrading the driver as part of this epic: CLOUDP-119739. It looks like they are scheduled to do it in the 3rd quarter. So it could be a little while before we find out if this works.&lt;/p&gt;</comment>
                            <comment id="4583434" author="JIRAUSER1265158" created="Tue, 31 May 2022 15:45:51 +0000"  >&lt;p&gt;Waiting to hear back on if the Cloud InTel team upgrades to 1.9 and if that resolves the disconnection issue.&lt;/p&gt;</comment>
                            <comment id="4578099" author="JIRAUSER1265158" created="Fri, 27 May 2022 15:34:24 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=vladimir.isakov%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;vladimir.isakov@mongodb.com&quot;&gt;vladimir.isakov@mongodb.com&lt;/a&gt; For this particularly issue, if our hypothesis is correct, 1.9 should be good enough.&lt;/p&gt;</comment>
                            <comment id="4576894" author="vladimir.isakov" created="Thu, 26 May 2022 23:03:59 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=preston.vasquez%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;preston.vasquez@mongodb.com&quot;&gt;preston.vasquez@mongodb.com&lt;/a&gt; I will have to check how difficult it would be for us to upgrade, but if we were to upgrade to version 1.9 (which is likely a bit more tried and true than the absolute latest 1.10.0), do you think that would be good enough?&lt;/p&gt;</comment>
                            <comment id="4576810" author="JIRAUSER1265158" created="Thu, 26 May 2022 21:57:08 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=vladimir.isakov%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;vladimir.isakov@mongodb.com&quot;&gt;vladimir.isakov@mongodb.com&lt;/a&gt;, thank you for the extremely detailed response.  From the logs, we notice that the &lt;tt&gt;(*Database).ListCollections&lt;/tt&gt; method is not retried after a connection failure.  As Benji suggests, this is unexpected behavior as retryable reads are enabled by default.  In the 1.7 version of the driver, we attempt to connect to the server &lt;a href=&quot;#L301&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;here&lt;/a&gt;.  This connection involves a series of handshakes that do not retry by default, and as you can see any errors in doing this simply get propagated, disconnecting the underlying network connection.  In 1.9 we handle this in a &lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/blob/release/1.9/x/mongo/driver/operation.go#L366&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;more robust&lt;/a&gt; way, retrying the connection and even ignoring this branch altogether unless necessary.  This logic was introduced in &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-1827&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;GODRIVER-1827&lt;/a&gt; and is unlikely to be backported as the work is pretty involved.  Version 1.10.0 will be released next week, and if it&apos;s not too much of an inconvenience we recommend upgrading to this version to see if these issues are resolved.&lt;/p&gt;</comment>
                            <comment id="4532683" author="vladimir.isakov" created="Fri, 6 May 2022 21:42:48 +0000"  >&lt;p&gt;&lt;font color=&quot;red&quot;&gt;When you say &#8220;many databases and collections&#8221;, how many are created in the E2E test? I&#8217;m assuming this issue only occurs when the listCollections/collStats commands are highly intensive operations server-side.&lt;/font&gt;&lt;br/&gt;
This is the &lt;a href=&quot;https://github.com/10gen/mms/blob/master/server/scripts/mock-data-gen/dataExplorerMockData.js&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;script&lt;/a&gt; we run to populate the dbs/collections. I have also been noticing this same error when we run an aggregation count command to count the number of documents in a collection in that same test. And I think I&apos;ve also seen it fail when we run the listIndexes command on a collection, also in that same test.&lt;/p&gt;

&lt;p&gt;&lt;font color=&quot;red&quot;&gt;Secondly, is this a new error? Do different versions of the Go driver affect the presence of the bug?&lt;/font&gt;&lt;br/&gt;
It&apos;s hard for me to tell which version of the go driver has this problem, but I can tell that the test we run in evergreen on master, which uses the go driver &lt;b&gt;go.mongodb.org/mongo-driver v1.7.2-0.20210804202952-82d3467025bc&lt;/b&gt; fails, while the tests we run on the 5.0 ops manager release in evergreen, which use the same go driver don&apos;t seem to be failing. The only difference I can see is that our e2e test on master gets run on an Amazon2-cloud-large box while the ops manager 5.0 e2e test gets run on a rhel76-cloud-large box.&lt;/p&gt;

&lt;p&gt;&lt;font color=&quot;red&quot;&gt;Thirdly, does this error happen when connected to a non-standalone server? If you ran the E2E test with a replicaset, for example, do you still see the error?&lt;/font&gt;&lt;br/&gt;
This failure occurs with a replica set as well, but more often with a standalone.&lt;/p&gt;

&lt;p&gt;&lt;font color=&quot;red&quot;&gt;Fourthly (apologies for the inundation of questions), looking at the mongod log, I&#8217;m surprised the listCollections command is not retried. Retryable reads are enabled by default on our Clients, so I would expect to see another listCollections command reaching the server. Is there another one in the server logs before the network error?&lt;/font&gt;&lt;br/&gt;
Luckily I still had the full mongod log. I just attached it to the ticket so that you can take a look.&lt;/p&gt;

&lt;p&gt;&lt;font color=&quot;red&quot;&gt;Finally, is there any reason to believe goctx, the context you pass into ListCollections, would have an unexpected deadline?&lt;/font&gt;&lt;br/&gt;
As far as I can tell, the context is created this way:&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;   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;background = &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;new&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;(emptyCtx)&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;where an empty context is defined like this:&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: #008200; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// An emptyCtx is never canceled, has no values, and has no deadline. It is not&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: #008200; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// struct{}, since vars of this type must have distinct addresses.&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;type emptyCtx &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;int&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;&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;I hope something in my responses help figure this out. I&apos;m sorry I can&apos;t be of much more help here. This problem is difficult to reproduce. It only seems to happen on the evergreen boxes where we run these e2e tests. Which makes me think it might somehow be related to the particular OS version on those boxes or something else about how they are configured. Would it be possible for you to run your tests directly on one of those boxes? I believe evergreen lets you spawn one of those boxes and ssh into it if you click on the link to the e2e test that I pasted in the description. Not sure if that&apos;s the right move... just a hunch.&lt;/p&gt;</comment>
                            <comment id="4520597" author="benji.rewis" created="Mon, 2 May 2022 18:35:57 +0000"  >&lt;p&gt;Apologies for the late response, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=vladimir.isakov%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;vladimir.isakov@mongodb.com&quot;&gt;vladimir.isakov@mongodb.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is a tough one. Like you, I&#8217;m unable to reproduce the error locally against 3.6, 4.2 or 5.0 even when I create ~1000 databases each with 100 collections. I have a few questions that might lead to potential avenues of investigation:&lt;/p&gt;

&lt;p&gt;When you say &#8220;many databases and collections&#8221;, how many are created in the E2E test? I&#8217;m assuming this issue only occurs when the &lt;tt&gt;listCollections&lt;/tt&gt;/&lt;tt&gt;collStats&lt;/tt&gt; commands are highly intensive operations server-side.&lt;/p&gt;

&lt;p&gt;Secondly, is this a new error? Do different versions of the Go driver affect the presence of the bug?&lt;/p&gt;

&lt;p&gt;Thirdly, does this error happen when connected to a non-standalone server? If you ran the E2E test with a replicaset, for example, do you still see the error?&lt;/p&gt;

&lt;p&gt;Fourthly (apologies for the inundation of questions), looking at the mongod log, I&#8217;m surprised the &lt;tt&gt;listCollections&lt;/tt&gt; command is not retried. Retryable reads are enabled by default on our Clients, so I would expect to see another &lt;tt&gt;listCollections&lt;/tt&gt; command reaching the server. Is there another one in the server logs before the network error?&lt;/p&gt;

&lt;p&gt;Finally, is there any reason to believe &lt;tt&gt;goctx&lt;/tt&gt;, the context you pass into &lt;tt&gt;ListCollections&lt;/tt&gt;, would have an unexpected deadline?&lt;/p&gt;

&lt;p&gt;Right now, the fact that MongoDB marks rogue &lt;tt&gt;listCollections&lt;/tt&gt; for termination on 4.2+ seems like a red herring to me. I don&#8217;t think that would cause the initial client-side disconnect.&lt;/p&gt;</comment>
                            <comment id="4508208" author="benji.rewis" created="Tue, 26 Apr 2022 21:28:02 +0000"  >&lt;p&gt;Thanks for your report, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=vladimir.isakov%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;vladimir.isakov@mongodb.com&quot;&gt;vladimir.isakov@mongodb.com&lt;/a&gt; ! I&apos;ll take a look into this soon.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="377718" name="mongodb.log" size="26361075" author="vladimir.isakov@mongodb.com" created="Fri, 6 May 2022 21:30:50 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0b8dc:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>