<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:36:26 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>[CSHARP-302] Frequent connection errors result in a Connect/Disconnect storm</title>
                <link>https://jira.mongodb.org/browse/CSHARP-302</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Currently the C# driver closes all connections in the connection pool whenever an error occurs on any connection. This makes sense in a few cases (for example, the server went away), but in many cases it just makes things worse by causing a Connect/Disconnect storm where connections don&apos;t live for very long.&lt;/p&gt;

&lt;p&gt;Furthermore, since Disconnect closes sockets as a background task, it is possible under heavy load to open connections faster than they are being closed, which can overwhelm the server.&lt;/p&gt;

&lt;p&gt;This condition is triggered automatically by high exception rates under load, or can also be triggered by the user code itself by calling Disconnect frequently (some developers have erroneously assumed it is necessary to call Connect and Disconnect around every database operation).&lt;/p&gt;

&lt;p&gt;The easiest way to tell if this is happening to you is to examine the server logs for frequent &quot;end connection&quot; log entries. &lt;/p&gt;

&lt;p&gt;The driver should be very conservative about ever closing all the connections in the connection pool. It should only do so when it can be 100% certain that all connections are doomed and are going to fail anyway (at the moment I&apos;m not sure how we could be 100% sure, so we might just stop doing this).&lt;/p&gt;</description>
                <environment></environment>
        <key id="20812">CSHARP-302</key>
            <summary>Frequent connection errors result in a Connect/Disconnect storm</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="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="robert@mongodb.com">Robert Stam</reporter>
                        <labels>
                    </labels>
                <created>Wed, 10 Aug 2011 14:46:39 +0000</created>
                <updated>Thu, 2 Apr 2015 18:28:34 +0000</updated>
                            <resolved>Mon, 12 Sep 2011 21:44:48 +0000</resolved>
                                    <version>1.1</version>
                                    <fixVersion>1.2</fixVersion>
                                                        <votes>1</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="53553" author="rstam" created="Mon, 12 Sep 2011 21:44:48 +0000"  >&lt;p&gt;Added new Unknown MongoServerState and set the state of the MongoServerInstance to Unknown on error, which subsequently triggers a call to VerifyUnknownStates to determine the latest state of the replica set. Also, when a connection is closed it is now down synchronously, so that the driver will never be able to open new connections faster than it is closing old one.&lt;/p&gt;</comment>
                            <comment id="47892" author="onyxmaster" created="Wed, 10 Aug 2011 21:38:47 +0000"  >&lt;p&gt;It appears that &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-153&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/CSHARP-153&lt;/a&gt; might be related to this one now. IOException almost always signals that there is some serious problem with the server.&lt;br/&gt;
I think that creating another exception (like MongoIOException, or MongoCommunicationException, but NOT mixing it with MongoConnectionException) and wrapping all network I/O places might be a good idea. Then, DetermineAction can just destroy pool only for MongoCommunicationExceptions.&lt;/p&gt;</comment>
                            <comment id="47817" author="rstam" created="Wed, 10 Aug 2011 18:25:11 +0000"  >&lt;p&gt;Partially fixed this in master. The default action when there is an exception on a connection is now to discard only the affected connection, not the entire connection pool. Disconnect has also been made synchronous so it should no longer be possible to open new connections faster than old ones are being closed.&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>
                    </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|hrh8iv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>14180</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>