<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:40:52 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-1862] System.AggregateException: An exception occurred while opening a connection to the server.</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1862</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;I am running a lot of operations in parallel which are trying to access the database. I get this error on one of the UpdateOneAsync() operations(this is not always the same, I get this exception on other functions as well). &lt;/p&gt;

&lt;p&gt;System.AggregateException: &lt;/p&gt;
{&quot;An exception occurred while opening a connection to the server.&quot;}

&lt;p&gt;StackTrace:&lt;/p&gt;

&lt;p&gt; at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)&lt;br/&gt;
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)&lt;br/&gt;
   at System.Threading.Tasks.Task.Wait()&lt;br/&gt;
   at Data.MongoContext.Update&lt;span class=&quot;error&quot;&gt;&amp;#91;T&amp;#93;&lt;/span&gt;(String collectionName, Expression`1 filter, Dictionary`2 fieldsToUpdate) in C:\...Data\MongoContext.cs:line 163&lt;br/&gt;
  ..&lt;/p&gt;

&lt;p&gt;The InnerException has more info:&lt;/p&gt;

&lt;p&gt;ConnectionId: {{ ServerId : &lt;/p&gt;
{ ClusterId : 1, EndPoint : &quot;Unspecified/localhost:27017&quot; }
&lt;p&gt;, LocalValue : 163 }}&lt;/p&gt;

&lt;p&gt;InnerException: &lt;/p&gt;
{&quot;Timed out connecting to Unspecified/localhost:27017. Timeout was 00:00:30.&quot;}

&lt;p&gt;Message: An exception occurred while opening a connection to the server.&lt;/p&gt;

&lt;p&gt;Source: MongoDB.Driver.Core&lt;/p&gt;

&lt;p&gt;StackTrace:    at MongoDB.Driver.Core.Connections.BinaryConnection.&amp;lt;OpenHelperAsync&amp;gt;d__48.MoveNext()&lt;br/&gt;
&amp;#8212; End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;br/&gt;
   at MongoDB.Driver.Core.Servers.Server.&amp;lt;GetChannelAsync&amp;gt;d__27.MoveNext()&lt;br/&gt;
&amp;#8212; End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;br/&gt;
   at MongoDB.Driver.Core.Operations.BulkMixedWriteOperation.&amp;lt;ExecuteAsync&amp;gt;d__39.MoveNext()&lt;br/&gt;
&amp;#8212; End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;br/&gt;
   at MongoDB.Driver.OperationExecutor.&amp;lt;ExecuteWriteOperationAsync&amp;gt;d__3`1.MoveNext()&lt;br/&gt;
&amp;#8212; End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;br/&gt;
   at MongoDB.Driver.MongoCollectionImpl`1.&amp;lt;ExecuteWriteOperationAsync&amp;gt;d__61`1.MoveNext()&lt;br/&gt;
&amp;#8212; End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;br/&gt;
   at MongoDB.Driver.MongoCollectionImpl`1.&amp;lt;BulkWriteAsync&amp;gt;d__22.MoveNext()&lt;br/&gt;
&amp;#8212; End of stack trace from previous location where exception was thrown &amp;#8212;&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&lt;br/&gt;
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&lt;br/&gt;
   at MongoDB.Driver.MongoCollectionBase`1.&amp;lt;UpdateOneAsync&amp;gt;d__43.MoveNext()&lt;/p&gt;

&lt;p&gt;I have tried changing the connectionpoolsize, waitqueuemultiple, waitqueuesize, maxidletimems and also making the MongoContext as a static variable. All that does not seem to help. I even tried to downgrade to 2.2 and 2.1 versions of the driver and also upgraded it to 2.4 but nothing seems to fix that issue. &lt;/p&gt;
</description>
                <environment>Mongodb 3.0.6 running on localhost, Win 7 ultimate 64bit</environment>
        <key id="336469">CSHARP-1862</key>
            <summary>System.AggregateException: An exception occurred while opening a connection 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="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="-1">Unassigned</assignee>
                                    <reporter username="thakursagar">Sagar Thakur</reporter>
                        <labels>
                            <label>question</label>
                    </labels>
                <created>Mon, 5 Dec 2016 17:57:52 +0000</created>
                <updated>Thu, 3 Dec 2020 18:24:57 +0000</updated>
                            <resolved>Thu, 3 Dec 2020 18:24:56 +0000</resolved>
                                    <version>2.3</version>
                                                    <component>Connectivity</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="3514791" author="jeff.yemin" created="Thu, 3 Dec 2020 18:24:56 +0000"  >&lt;p&gt;Apologies for not answering on this ticket immediately.&lt;/p&gt;

&lt;p&gt;Issues like this are almost always related to connectivity issues outside of the control of the driver, not a driver bug.  &lt;/p&gt;

&lt;p&gt;For anyone else experiencing issues like this, here are some resources to get questions answered more quickly:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Our MongoDB support portal, located at &lt;a href=&quot;https://support.mongodb.com/welcome&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;support.mongodb.com&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;Our MongoDB community portal, located &lt;a href=&quot;https://developer.mongodb.com/community/forums/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;If you are an Atlas customer, there is free support offered 24/7 in the lower right hand corner of the UI&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Thank you!&lt;/p&gt;</comment>
                    </comments>
                    <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|hssk2n:</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>