<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:20:08 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>[CDRIVER-4168] mongoc driver keeps reconnecting to the server ?</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-4168</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;wih latest mongo c lib 19.1 and mongodb community 5.0.2 I find a LOT of sockets in timed_wait (client is on windows 7)&#160;&lt;/p&gt;

&lt;p&gt;there appears to me to be constant needless socket allocation to a stable mongodb&lt;/p&gt;

&lt;p&gt;c:\temp\mongo-c-driver-1.19.0\mongo-c-driver-1.19.0\src\libmongoc\src\mongoc\mongoc-cluster.c&lt;/p&gt;

&lt;p&gt;mongoc_cluster_fetch_stream_pooled&lt;/p&gt;

&lt;p&gt;cluster_node = _mongoc_cluster_add_node (cluster, server_id, error);&lt;/p&gt;

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

&lt;p&gt;I obtain different clients from a single mongoc_client_pool_t&lt;/p&gt;

&lt;p&gt;in the connection url I put these as high as possible but there doesn&apos;t seem to be considering them, it seems to allocate sockets irrespectively&#160;&lt;/p&gt;

&lt;p&gt;heartbeatfrequencyms=1000000&lt;/p&gt;

&lt;p&gt;socketCheckIntervalMS=1000000&lt;/p&gt;

&lt;p&gt;what could I do to stop it leaking sockets ?&lt;/p&gt;

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

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1878956">CDRIVER-4168</key>
            <summary>mongoc driver keeps reconnecting to the server ?</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</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="5">Cannot Reproduce</resolution>
                                        <assignee username="kevin.albertson@mongodb.com">Kevin Albertson</assignee>
                                    <reporter username="g.fanini@gmail.com">G F</reporter>
                        <labels>
                    </labels>
                <created>Mon, 20 Sep 2021 20:31:12 +0000</created>
                <updated>Mon, 10 Jan 2022 14:02:35 +0000</updated>
                            <resolved>Mon, 10 Jan 2022 14:02:35 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4282936" author="kevin.albertson" created="Mon, 10 Jan 2022 14:02:35 +0000"  >&lt;p&gt;Closing as &quot;Cannot Reproduce&quot; since I am unable to reproduce the bug of opening and closing sockets as described in the ticket description.&lt;/p&gt;</comment>
                            <comment id="4270586" author="g.fanini@gmail.com" created="Thu, 30 Dec 2021 01:46:34 +0000"  >&lt;p&gt;forgive me for a &quot;philosophical&quot; idle speculation, hmm in this server monitoring and discovery SDAM spec &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring-monitoring.rst&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring-monitoring.rst&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;in completely abstract terms, there&apos;s nothing specifying that a collection on client/server side shouldn&apos;t be both readable/find and writeable/bulk execute hmm (obviously I can only think of client side, I looked at the server side &quot;cursorily&quot; and it&apos;s mind boggling with C++ futures no idea)&lt;/p&gt;

&lt;p&gt;this actually doesn&apos;t help much, but it&apos;s my internal reasoning if of any use say possibly to multiplex both reads and writes on a single client/collection say via mongodb wire protocol with requestid/response to, since the tcp socket is bidirectional ?&lt;/p&gt;

&lt;p&gt;how does the record locking work on server side in case of one client reading and another writing ? any clue whatsoever ?&lt;/p&gt;</comment>
                            <comment id="4270151" author="kevin.albertson" created="Wed, 29 Dec 2021 18:30:17 +0000"  >&lt;blockquote&gt;
&lt;p&gt;could it be thinkable in your future modifications to allow concurrent ?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-3525&quot; title=&quot;Implement a spec-compliant connection pool&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-3525&quot;&gt;&lt;del&gt;CDRIVER-3525&lt;/del&gt;&lt;/a&gt; is a proposal rework how connections are shared on clients to make it consistent with other language drivers. There are related open questions in that description: &quot;Do we only make a mongoc_client_t thread safe? Or a mongoc_database_t/mongoc_collection_t as well.&quot;. I suggest watching that ticket for updates.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;in order to say reduce record contention server side if both querying and writing to same record/doc, i.e. instead of from different clients I&apos;d guess there would be less contention from a single client.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-4002&quot; title=&quot;Improve multi-threaded perf for mongoc_client_pool_t&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-4002&quot;&gt;&lt;del&gt;CDRIVER-4002&lt;/del&gt;&lt;/a&gt; addresses several related issues with contention on shared structures within &lt;tt&gt;mongoc_client_pool_t&lt;/tt&gt;. If you are seeing high contention, consider upgrading to 1.20.0.&lt;/p&gt;
</comment>
                            <comment id="4270125" author="g.fanini@gmail.com" created="Wed, 29 Dec 2021 18:06:24 +0000"  >&lt;p&gt;concurrent find and bulk execute work with separate pooled clients, could it be thinkable in your future modifications to allow concurrent ? the keep alive threads seem to modify a shared &quot;cluster&quot; structure ? in order to say reduce record contention server side if both querying and writing to same record/doc, i.e. instead of from different clients I&apos;d guess there would be less contention from a single client.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="4270109" author="kevin.albertson" created="Wed, 29 Dec 2021 17:59:14 +0000"  >&lt;blockquote&gt;
&lt;p&gt;is it thinkable that&#160;&#160;mongoc_collection_find(), leaves the cursor unexhausted, whereas mongoc_collection_find_with_opts() exhausts it ?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/blob/1.19.0/src/libmongoc/src/mongoc/mongoc-collection.c#L381&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongoc_collection_find&lt;/a&gt; and &lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/blob/1.19.0/src/libmongoc/src/mongoc/mongoc-collection.c#L450&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongoc_collection_find_with_opts&lt;/a&gt; share much of the code path with &lt;tt&gt;_mongoc_cursor_find_new&lt;/tt&gt;. If there is a difference, my hypothesis is that there is a difference in options passed between the two calls.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Also another information/clue ; can these finds be run on a collection, which is executing bulk writes in parallel in another thread ? it doesn&apos;t seem to be possible.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;As long as the other thread is using a collection obtained from a separate client, it should be. Do you observe an error or missing results?&lt;/p&gt;</comment>
                            <comment id="4270080" author="g.fanini@gmail.com" created="Wed, 29 Dec 2021 17:44:31 +0000"  >&lt;p&gt;Hi, forgive my stupidity, is it thinkable that&#160;&#160;mongoc_collection_find(), leaves the cursor unexhausted, whereas mongoc_collection_find_with_opts() exhausts it ?&lt;/p&gt;

&lt;p&gt;Also another information/clue ; can these finds be run on a collection, which is executing bulk writes in parallel in another thread ? it doesn&apos;t seem to be possible.&lt;/p&gt;</comment>
                            <comment id="4270066" author="kevin.albertson" created="Wed, 29 Dec 2021 17:30:52 +0000"  >&lt;p&gt;Thank you for including the reproducible example &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=g.fanini%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;g.fanini@gmail.com&quot;&gt;g.fanini@gmail.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Building and run example-update_socket_leak.c with C driver 1.19.0 and a 5.0.2 community MongoDB server. I did not observe leaking sockets.&lt;/p&gt;

&lt;p&gt;Using &lt;tt&gt;netstat -q | Select-String -Pattern &quot;27017&quot;&lt;/tt&gt; I only see 3 client sockets established while the example is running. Two sockets are created for monitoring, and one for application operations. After the process finished, I see the 3 client sockets in the TIMED_WAIT state.&lt;/p&gt;

&lt;p&gt;In case it is helpful: my initial hypothesis was this was related to the use of &lt;tt&gt;MONGOC_QUERY_EXHAUST&lt;/tt&gt;. If an exhaust cursor does is not fully iterated, the socket for the &lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/blob/1.19.0/src/libmongoc/src/mongoc/mongoc-cursor.c#L607-L612&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;exhaust cursor is closed&lt;/a&gt; since it is no longer usable. That is not the case in example-update_socket_leak.c. It repeatedly calls &lt;tt&gt;mongoc_cursor_next&lt;/tt&gt; until no results are returned. Consider removing the &lt;tt&gt;MONGOC_QUERY_EXHAUST&lt;/tt&gt; flag to see if the problem persists.&lt;/p&gt;</comment>
                            <comment id="4075944" author="g.fanini@gmail.com" created="Tue, 21 Sep 2021 22:10:11 +0000"  >&lt;p&gt;this is the call stack of what I suspect might be runaway reconnections during an apparently &quot;peaceful&quot; query cursor iteration :&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;h6&gt;&lt;a name=&quot;%7B%7Bmongoc1.0.dll%21mongocsocketnew%28intdomain%3D0x00000002%2Cinttype%3D0x00000001%2Cintprotocol%3D0x00000000%29%C2%A0Line1032mongoc1.0.dll%21mongocsocketnew%28intdomain%3D0x00000002%2Cinttype%3D0x00000001%2Cintprotocol%3D0x00000000%29%C2%A0Line1032%7D%7D&quot;&gt;&lt;/a&gt;&lt;tt&gt;mongoc-1.0.dll!mongoc_socket_new(int domain=0x00000002, int type=0x00000001, int protocol=0x00000000)&#160; Line 1032 mongoc-1.0.dll!mongoc_socket_new(int domain=0x00000002, int type=0x00000001, int protocol=0x00000000)&#160; Line 1032&lt;/tt&gt;&lt;/h6&gt;
&lt;h6&gt;&lt;a name=&quot;%7B%7Bmongoc1.0.dll%21mongocclientconnecttcp%28intconnecttimeoutms%3D0x00002710%2Cconstmongochostlistthost%3D0x019d32b0%2Cbsonerrorterror%3D0x01990378%29%C2%A0Line6880x11bytes%7D%7D&quot;&gt;&lt;/a&gt;&lt;tt&gt;mongoc-1.0.dll!mongoc_client_connect_tcp(int connecttimeoutms=0x00002710, const _mongoc_host_list_t * host=0x019d32b0, _bson_error_t * error=0x01990378)&#160; Line 688 + 0x11 bytes&lt;/tt&gt;&lt;/h6&gt;
&lt;h6&gt;&lt;a name=&quot;%7B%5C%7Bmongoc1.0.dll%21mongocclientconnect%28charbuffered%3D%27%01%27%2Ccharusessl%3D0x00%2Cvoidssloptsvoid%3D0x01994230%2Cconstmongocurituri%3D0x00002710%2Cconstmongochostlistthost%3D0x019d32b0%2Cbsonerrorterror%3D0x01990378%29%C2%A0Line8220xcbytes%7D%7D&quot;&gt;&lt;/a&gt;{{mongoc-1.0.dll!mongoc_client_connect(char buffered=&apos;�&apos;, char use_ssl=0x00, void * ssl_opts_void=0x01994230, const _mongoc_uri_t * uri=0x00002710, const _mongoc_host_list_t * host=0x019d32b0, _bson_error_t * error=0x01990378)&#160; Line 822 + 0xc bytes }}&lt;/h6&gt;
&lt;h6&gt;&lt;a name=&quot;%7B%5C%7Bmongoc1.0.dll%21mongocclientdefaultstreaminitiator%28constmongocurituri%3D0x019a09d8%2Cconstmongochostlistthost%3D0x019d32b0%2Cvoiduserdata%3D0x01994100%2Cbsonerrorterror%3D0x01990378%29%C2%A0Line9140x23bytes%7D%7D&quot;&gt;&lt;/a&gt;{{mongoc-1.0.dll!mongoc_client_default_stream_initiator(const _mongoc_uri_t * uri=0x019a09d8, const _mongoc_host_list_t * host=0x019d32b0, void * user_data=0x01994100, _bson_error_t * error=0x01990378)&#160; Line 914 + 0x23 bytes }}&lt;/h6&gt;
&lt;h6&gt;&lt;a name=&quot;%7B%5C%7Bmongoc1.0.dll%21mongocclientcreatestream%28mongocclienttclient%3D0x019941e0%2Cconstmongochostlistthost%3D0x019d32b0%2Cbsonerrorterror%3D0x01990378%29%C2%A0Line9480x17bytes%7D%7D&quot;&gt;&lt;/a&gt;{{mongoc-1.0.dll!_mongoc_client_create_stream(_mongoc_client_t * client=0x019941e0, const _mongoc_host_list_t * host=0x019d32b0, _bson_error_t * error=0x01990378)&#160; Line 948 + 0x17 bytes }}&lt;/h6&gt;
&lt;h6&gt;&lt;a name=&quot;%7B%5C%7Bmongoc1.0.dll%21mongocclusteraddnode%28mongocclustertcluster%3D0x00000000%2Cunsignedintserverid%3D0x00000001%2Cvoiderror%3D0x62c79d83%29%C2%A0Line21500xf0bytes%7D%7D&quot;&gt;&lt;/a&gt;{{mongoc-1.0.dll!_mongoc_cluster_add_node(_mongoc_cluster_t * cluster=0x00000000, unsigned int server_id=0x00000001, void * error=0x62c79d83)&#160; Line 2150 + 0xf0 bytes }}&lt;/h6&gt;
&lt;h6&gt;&lt;a name=&quot;%7B%5C%7Bmongoc1.0.dll%21mongocclusterfetchstreampooled%28mongocclustertcluster%3D0x019941e8%2Cunsignedintserverid%3D0x00000001%2Ccharreconnectok%3D%27%01%27%2Cbsonerrorterror%3D0x01990378%29%C2%A0Line26570x10bytes%7D%7D&quot;&gt;&lt;/a&gt;{{mongoc-1.0.dll!mongoc_cluster_fetch_stream_pooled(_mongoc_cluster_t * cluster=0x019941e8, unsigned int server_id=0x00000001, char reconnect_ok=&apos;�&apos;, _bson_error_t * error=0x01990378)&#160; Line 2657 + 0x10 bytes }}&lt;/h6&gt;
&lt;h6&gt;&lt;a name=&quot;%7B%5C%7Bmongoc1.0.dll%21mongocclusterstreamforserver%28mongocclustertcluster%3D0x019941e8%2Cunsignedintserverid%3D0x00000001%2Ccharreconnectok%3D%27%01%27%2Cconstmongocclientsessiontcs%3D0x00000000%2Cbsontreply%3D0x1202f380%2Cbsonerrorterror%3D0x01990378%29%C2%A0Line22680xbbytes%7D%7D&quot;&gt;&lt;/a&gt;{{mongoc-1.0.dll!_mongoc_cluster_stream_for_server(_mongoc_cluster_t * cluster=0x019941e8, unsigned int server_id=0x00000001, char reconnect_ok=&apos;�&apos;, const _mongoc_client_session_t * cs=0x00000000, _bson_t * reply=0x1202f380, _bson_error_t * error=0x01990378)&#160; Line 2268 + 0xb bytes }}&lt;/h6&gt;
&lt;h6&gt;&lt;a name=&quot;%7B%5C%7Bmongoc1.0.dll%21mongocclusterstreamforoptype%28mongocclustertcluster%3D0x019941e8%2Cmongocssoptypetoptype%3DMONGOCSSREAD%2Cconstmongocreadprefstreadprefs%3D0x0199a650%2Cmongocclientsessiontcs%3D0x00000000%2Cbsontreply%3D0x1202f380%2C...&quot;&gt;&lt;/a&gt;{{mongoc-1.0.dll!_mongoc_cluster_stream_for_optype(_mongoc_cluster_t * cluster=0x019941e8, mongoc_ss_optype_t optype=MONGOC_SS_READ, const _mongoc_read_prefs_t * read_prefs=0x0199a650, _mongoc_client_session_t * cs=0x00000000, _bson_t * reply=0x1202f380, _bson_error_t * error=0x01990378)&#160; Line 2846 + 0x14 bytes }}&lt;/h6&gt;
&lt;h6&gt;&lt;a name=&quot;%7B%5C%7Bmongoc1.0.dll%21mongocclusterstreamforreads%28mongocclustertcluster%3D0x019941e8%2Cconstmongocreadprefstreadprefs%3D0x0199a650%2Cmongocclientsessiontcs%3D0x00000000%2Cbsontreply%3D0x1202f380%2Cbsonerrorterror%3D0x01990378%29%C2%A0Line28840x19bytes%7D%7D&quot;&gt;&lt;/a&gt;{{mongoc-1.0.dll!mongoc_cluster_stream_for_reads(_mongoc_cluster_t * cluster=0x019941e8, const _mongoc_read_prefs_t * read_prefs=0x0199a650, _mongoc_client_session_t * cs=0x00000000, _bson_t * reply=0x1202f380, _bson_error_t * error=0x01990378)&#160; Line 2884 + 0x19 bytes }}&lt;/h6&gt;
&lt;h6&gt;&lt;a name=&quot;%7B%5C%7Bmongoc1.0.dll%21mongoccursorfetchstream%28mongoccursortcursor%3D0x01990250%29%C2%A0Line6690x28bytes%7D%7D&quot;&gt;&lt;/a&gt;{{mongoc-1.0.dll!_mongoc_cursor_fetch_stream(_mongoc_cursor_t * cursor=0x01990250)&#160; Line 669 + 0x28 bytes }}&lt;/h6&gt;
&lt;h6&gt;&lt;a name=&quot;%7B%5C%7Bmongoc1.0.dll%21prime%28mongoccursortcursor%3D0x01990250%29%C2%A0Line400x6bytes%7D%7D&quot;&gt;&lt;/a&gt;{{mongoc-1.0.dll!_prime(_mongoc_cursor_t * cursor=0x01990250)&#160; Line 40 + 0x6 bytes }}&lt;/h6&gt;
&lt;h6&gt;&lt;a name=&quot;%7B%5C%7Bmongoc1.0.dll%21mongoccursornext%28mongoccursortcursor%3D0x01990250%2Cconstbsontbson%3D0x1202f568%29%C2%A0Line12870x2abytes%7D%7D&quot;&gt;&lt;/a&gt;{{mongoc-1.0.dll!mongoc_cursor_next(_mongoc_cursor_t * cursor=0x01990250, const _bson_t * * bson=0x1202f568)&#160; Line 1287 + 0x2a bytes }}&lt;/h6&gt;
&lt;h6&gt;&lt;a name=&quot;%7B%7BNa192.exe%21MongoDbGetRecord%28AXRCBtlprcb%3D0x01d42894%2Cchardst%3D0x1202fb10%2Cintmongolen%3D0x1202f76c%2Cmongoccollectiontcollection%3D0x0198ed88%29%C2%A0Line23490xcbytes%C2%A0%7D%7D%7B%7B%7D%7D%7B%7B%7D%7D&quot;&gt;&lt;/a&gt;&lt;tt&gt;Na192.exe!MongoDbGetRecord(AXRCB_t * lprcb=0x01d42894, char * dst=0x1202fb10, int * mongolen=0x1202f76c, _mongoc_collection_t * collection=0x0198ed88)&#160; Line 2349 + 0xc bytes&#160;&lt;/tt&gt;&lt;tt&gt;}}{{&lt;/tt&gt;&lt;/h6&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="4073337" author="g.fanini@gmail.com" created="Tue, 21 Sep 2021 03:50:59 +0000"  >&lt;p&gt;I attached one of the driver&apos;s examples example-update.c that I modified with a #define to use pool, with a single thread I &lt;ins&gt;cannot&lt;/ins&gt; reproduce the socket leak that I seem to be getting elsewhere with multiple threads, (I make sure of that with a breakpoint in mongoc_socket_new() ), that I will try next&lt;/p&gt;

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

&lt;p&gt;I attach a multiple (2) thread very silly test&#160;example-update1.c that also &lt;ins&gt;doesn&apos;t&lt;/ins&gt; seem to leak, I studied more carefully where I&apos;m getting leaks there doesn&apos;t seem to be anything involving allocations like a new pool from uri, it&apos;s all with a fixed single pool and fixed threads with client and identical collection from that pool.&lt;/p&gt;

&lt;p&gt;Is it thinkable there might be some circumstances which lead the (one or more ?) monitoring threads of lib C api to somehow reconnect ? is there any way to find out what may be tripping a reconnection, the mongodb is not replica it&apos;s standalone that I understand that may cause reconnections with it not being &quot;primary&quot; ?&lt;/p&gt;

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

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

&lt;p&gt;As far as I can tell, it seems to happen iterating the cursor obtained from (deprecated) mongoc_collection_find(), it doesn&apos;t do it with&#160;mongoc_collection_find_with_opts(), this solves the leak empirically in my program, I enclosed&#160;example-update_socket_leak.c, that it&apos;s nothing to do with multiple threads I suspect, however this won&apos;t reproduce leaking sockets oddly enough !?&#160;&lt;/p&gt;

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

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

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="4073331" author="g.fanini@gmail.com" created="Tue, 21 Sep 2021 03:33:29 +0000"  >&lt;p&gt;Hi I&apos;m not trying to be silly, on the client side I am swamped by about 8k sockets in timed_wait on windows, but it varies, on the mongo db community 5.0.2 side I have a noticeable slow down due to these logs :&lt;/p&gt;

{&quot;t&quot;:\{&quot;$date&quot;:&quot;2021-09-21T05:26:58.706+02:00&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;I&quot;, &quot;c&quot;:&quot;NETWORK&quot;, &quot;id&quot;:22943, &quot;ctx&quot;:&quot;listener&quot;,&quot;msg&quot;:&quot;Connection accepted&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;10.157.131.139:58778&quot;,&quot;uuid&quot;:&quot;a8affb81-1d60-455f-b134-ddebe4377f3f&quot;,&quot;connectionId&quot;:210768,&quot;connectionCount&quot;:32}}&lt;/p&gt;
{&quot;t&quot;:\{&quot;$date&quot;:&quot;2021-09-21T05:26:58.720+02:00&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;I&quot;, &quot;c&quot;:&quot;NETWORK&quot;, &quot;id&quot;:51800, &quot;ctx&quot;:&quot;conn210768&quot;,&quot;msg&quot;:&quot;client metadata&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;10.157.131.139:58778&quot;,&quot;client&quot;:&quot;conn210768&quot;,&quot;doc&quot;:{&quot;driver&quot;:&lt;/p&gt;
{&quot;name&quot;:&quot;mongoc&quot;,&quot;version&quot;:&quot;1.19.0&quot;}
&lt;p&gt;,&quot;os&quot;:{&quot;type&quot;:&quot;Windows&quot;,&quot;name&quot;:&quot;Windows&quot;,&quot;version&quot;:&quot;6.1 (7601)&quot;,&quot;architecture&quot;:&quot;x86&quot;},&quot;platform&quot;:&quot;cfg=0x0004170063 CC=MSVC 1500 CFLAGS=\&quot;/DWIN32 /D_WINDOWS /W3\&quot; LDFLAGS=\&quot;/machine:X86\&quot;&quot;}}}&lt;/p&gt;
{&quot;t&quot;:\{&quot;$date&quot;:&quot;2021-09-21T05:26:58.721+02:00&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;I&quot;, &quot;c&quot;:&quot;NETWORK&quot;, &quot;id&quot;:22944, &quot;ctx&quot;:&quot;conn210768&quot;,&quot;msg&quot;:&quot;Connection ended&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;10.157.131.139:58778&quot;,&quot;uuid&quot;:&quot;a8affb81-1d60-455f-b134-ddebe4377f3f&quot;,&quot;connectionId&quot;:210768,&quot;connectionCount&quot;:31}}&lt;/p&gt;
{&quot;t&quot;:\{&quot;$date&quot;:&quot;2021-09-21T05:26:58.722+02:00&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;I&quot;, &quot;c&quot;:&quot;NETWORK&quot;, &quot;id&quot;:22943, &quot;ctx&quot;:&quot;listener&quot;,&quot;msg&quot;:&quot;Connection accepted&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;10.157.131.139:58779&quot;,&quot;uuid&quot;:&quot;7ea1c344-aacb-4f99-a487-8ae669030b75&quot;,&quot;connectionId&quot;:210769,&quot;connectionCount&quot;:32}}&lt;/p&gt;
{&quot;t&quot;:\{&quot;$date&quot;:&quot;2021-09-21T05:26:58.735+02:00&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;I&quot;, &quot;c&quot;:&quot;NETWORK&quot;, &quot;id&quot;:51800, &quot;ctx&quot;:&quot;conn210769&quot;,&quot;msg&quot;:&quot;client metadata&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;10.157.131.139:58779&quot;,&quot;client&quot;:&quot;conn210769&quot;,&quot;doc&quot;:{&quot;driver&quot;:&lt;/p&gt;
{&quot;name&quot;:&quot;mongoc&quot;,&quot;version&quot;:&quot;1.19.0&quot;}
&lt;p&gt;,&quot;os&quot;:{&quot;type&quot;:&quot;Windows&quot;,&quot;name&quot;:&quot;Windows&quot;,&quot;version&quot;:&quot;6.1 (7601)&quot;,&quot;architecture&quot;:&quot;x86&quot;},&quot;platform&quot;:&quot;cfg=0x0004170063 CC=MSVC 1500 CFLAGS=\&quot;/DWIN32 /D_WINDOWS /W3\&quot; LDFLAGS=\&quot;/machine:X86\&quot;&quot;}}}&lt;/p&gt;
{&quot;t&quot;:\{&quot;$date&quot;:&quot;2021-09-21T05:26:58.736+02:00&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;I&quot;, &quot;c&quot;:&quot;NETWORK&quot;, &quot;id&quot;:22944, &quot;ctx&quot;:&quot;conn210769&quot;,&quot;msg&quot;:&quot;Connection ended&quot;,&quot;attr&quot;:{&quot;remote&quot;:&quot;10.157.131.139:58779&quot;,&quot;uuid&quot;:&quot;7ea1c344-aacb-4f99-a487-8ae669030b75&quot;,&quot;connectionId&quot;:210769,&quot;connectionCount&quot;:31}}&lt;/p&gt;</comment>
                            <comment id="4073323" author="kevin.albertson" created="Tue, 21 Sep 2021 03:25:01 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=g.fanini%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;g.fanini@gmail.com&quot;&gt;g.fanini@gmail.com&lt;/a&gt;, thank you for your report, we will look into this soon!&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="336295" name="example-update.c" size="3016" author="g.fanini@gmail.com" created="Tue, 21 Sep 2021 10:25:42 +0000"/>
                            <attachment id="336335" name="example-update1.c" size="4594" author="g.fanini@gmail.com" created="Tue, 21 Sep 2021 14:07:22 +0000"/>
                            <attachment id="336589" name="example-update_socket_leak.c" size="6995" author="g.fanini@gmail.com" created="Wed, 22 Sep 2021 12:08:16 +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|hr6ihr:</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>