<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:39:01 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-1227] Connection to replicaset, RequestHeartbeat error</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1227</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;The driver crashes with the following error:&lt;/p&gt;

&lt;p&gt;An unhandled exception occurred and the process was terminated.&lt;br/&gt;
Application ID: Helios-6408e122-16e7-4b49-b613-826625892360&lt;br/&gt;
Process ID: 3620&lt;br/&gt;
Exception: System.ObjectDisposedException&lt;br/&gt;
Message: Cannot access a disposed object.&lt;br/&gt;
Object name: &apos;ClusterableServer&apos;.&lt;/p&gt;

&lt;p&gt;StackTrace:    at MongoDB.Driver.Core.Servers.ClusterableServer.ThrowIfDisposed()&lt;br/&gt;
   at MongoDB.Driver.Core.Servers.ClusterableServer.RequestHeartbeat()&lt;br/&gt;
   at MongoDB.Driver.Core.Clusters.MultiServerCluster.RequestHeartbeat()&lt;br/&gt;
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&lt;br/&gt;
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&lt;br/&gt;
   at System.Threading.TimerQueueTimer.CallCallback()&lt;br/&gt;
   at System.Threading.TimerQueueTimer.Fire()&lt;br/&gt;
   at System.Threading.TimerQueue.FireNextTimers()&lt;/p&gt;

&lt;p&gt;We are getting this error in our daily performance tests sometimes.&lt;br/&gt;
It happens at random times, not always at the same place.&lt;br/&gt;
Never with a direct call on the mongo driver (nothing from our code in the stacktrace).&lt;/p&gt;

&lt;p&gt;We also run the same test on a single mongo instance. This never gives any problem.&lt;/p&gt;

&lt;p&gt;When our framework starts in gets a client and database class.&lt;br/&gt;
It keeps using the same database class the whole time.&lt;/p&gt;
</description>
                <environment>Server, Windows 2012 R2 running our framework in IIS.&lt;br/&gt;
Connection to a cluster of 3 windows 2012 R2 servers running MongoDb 3.0.1&lt;br/&gt;
All servers running in windows Azure.</environment>
        <key id="193372">CSHARP-1227</key>
            <summary>Connection to replicaset, RequestHeartbeat error</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="craig.wilson@mongodb.com">Craig Wilson</assignee>
                                    <reporter username="robkoenis">Rob Koenis</reporter>
                        <labels>
                            <label>rc</label>
                    </labels>
                <created>Wed, 1 Apr 2015 12:15:52 +0000</created>
                <updated>Sat, 2 Apr 2016 01:55:28 +0000</updated>
                            <resolved>Thu, 2 Apr 2015 18:05:42 +0000</resolved>
                                    <version>2.0</version>
                                    <fixVersion>2.0</fixVersion>
                                    <component>Connectivity</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="872207" author="craiggwilson" created="Fri, 3 Apr 2015 13:32:05 +0000"  >&lt;p&gt;Thanks so much, Rob, for the confirmation. Please re-open if it comes back again.&lt;/p&gt;</comment>
                            <comment id="872206" author="robkoenis" created="Fri, 3 Apr 2015 13:31:29 +0000"  >&lt;p&gt;I have not found any problems with the latest master.&lt;br/&gt;
Today i have upgraded our software to the 2.0.0 final, no problems so far.&lt;br/&gt;
Problem solved.&lt;/p&gt;

&lt;p&gt;Thanks for the quick response.&lt;/p&gt;</comment>
                            <comment id="871202" author="robkoenis" created="Thu, 2 Apr 2015 08:57:21 +0000"  >&lt;p&gt;I did have the error last night again in our daily performance test (running the &apos;old&apos; 2.0 drivers).&lt;/p&gt;

&lt;p&gt;I&apos;m now running tests with the latest Master.&lt;br/&gt;
It are very long test and the error does not always occur. &lt;br/&gt;
It will take some time to make any conclusions if it is fixed.&lt;br/&gt;
I will report back if i know more after running lots of tests.&lt;/p&gt;</comment>
                            <comment id="870313" author="craiggwilson" created="Wed, 1 Apr 2015 16:05:48 +0000"  >&lt;p&gt;Rob... I didn&apos;t see anything odd in your logs or any particular reason you would be hitting this, but in the course of investigating, we found a race condition that was possible and presented the same stack trace you are seeing. This has been pushed to master. If you&apos;re able, it would be tremendous if you could pull master, build it, and see if this fixes your problem. If not, I totally understand.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Craig&lt;/p&gt;</comment>
                            <comment id="870305" author="xgen-internal-githook" created="Wed, 1 Apr 2015 16:02:29 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;craiggwilson&apos;, u&apos;name&apos;: u&apos;Craig Wilson&apos;, u&apos;email&apos;: u&apos;craiggwilson@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1227&quot; title=&quot;Connection to replicaset, RequestHeartbeat error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1227&quot;&gt;&lt;del&gt;CSHARP-1227&lt;/del&gt;&lt;/a&gt;: fixed race condition between server disposal and heartbeat requests.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/e7b2664b54006dd4b014c5848b225ae3e5b86b59&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/e7b2664b54006dd4b014c5848b225ae3e5b86b59&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="870158" author="robkoenis" created="Wed, 1 Apr 2015 14:09:27 +0000"  >

&lt;p&gt;set1:PRIMARY&amp;gt; rs.config()&lt;br/&gt;
{&lt;br/&gt;
        &quot;_id&quot; : &quot;set1&quot;,&lt;br/&gt;
        &quot;version&quot; : 199311,&lt;br/&gt;
        &quot;members&quot; : [&lt;br/&gt;
                {&lt;br/&gt;
                        &quot;_id&quot; : 1,&lt;br/&gt;
                        &quot;host&quot; : &quot;10.0.0.8:27018&quot;,&lt;br/&gt;
                        &quot;arbiterOnly&quot; : false,&lt;br/&gt;
                        &quot;buildIndexes&quot; : true,&lt;br/&gt;
                        &quot;hidden&quot; : false,&lt;br/&gt;
                        &quot;priority&quot; : 1,&lt;br/&gt;
                        &quot;tags&quot; : {&lt;/p&gt;

&lt;p&gt;                        },&lt;br/&gt;
                        &quot;slaveDelay&quot; : 0,&lt;br/&gt;
                        &quot;votes&quot; : 1&lt;br/&gt;
                },&lt;br/&gt;
                {&lt;br/&gt;
                        &quot;_id&quot; : 2,&lt;br/&gt;
                        &quot;host&quot; : &quot;10.0.0.9:27018&quot;,&lt;br/&gt;
                        &quot;arbiterOnly&quot; : false,&lt;br/&gt;
                        &quot;buildIndexes&quot; : true,&lt;br/&gt;
                        &quot;hidden&quot; : false,&lt;br/&gt;
                        &quot;priority&quot; : 1,&lt;br/&gt;
                        &quot;tags&quot; : {&lt;/p&gt;

&lt;p&gt;                        },&lt;br/&gt;
                        &quot;slaveDelay&quot; : 0,&lt;br/&gt;
                        &quot;votes&quot; : 1&lt;br/&gt;
                },&lt;br/&gt;
                {&lt;br/&gt;
                        &quot;_id&quot; : 3,&lt;br/&gt;
                        &quot;host&quot; : &quot;10.0.0.10:27018&quot;,&lt;br/&gt;
                        &quot;arbiterOnly&quot; : false,&lt;br/&gt;
                        &quot;buildIndexes&quot; : true,&lt;br/&gt;
                        &quot;hidden&quot; : false,&lt;br/&gt;
                        &quot;priority&quot; : 1,&lt;br/&gt;
                        &quot;tags&quot; : {&lt;/p&gt;

&lt;p&gt;                        },&lt;br/&gt;
                        &quot;slaveDelay&quot; : 0,&lt;br/&gt;
                        &quot;votes&quot; : 1&lt;br/&gt;
                }&lt;br/&gt;
        ],&lt;br/&gt;
        &quot;settings&quot; : {&lt;br/&gt;
                &quot;chainingAllowed&quot; : true,&lt;br/&gt;
                &quot;heartbeatTimeoutSecs&quot; : 60,&lt;br/&gt;
                &quot;getLastErrorModes&quot; : {&lt;/p&gt;

&lt;p&gt;                },&lt;br/&gt;
                &quot;getLastErrorDefaults&quot; : &lt;/p&gt;
{
                        &quot;w&quot; : &quot;majority&quot;,
                        &quot;wtimeout&quot; : 10000
                }
&lt;p&gt;        }&lt;br/&gt;
}&lt;/p&gt;</comment>
                            <comment id="870146" author="robkoenis" created="Wed, 1 Apr 2015 14:01:18 +0000"  >
&lt;p&gt;I have attached the server logs.&lt;br/&gt;
The error did occure at 4/1/2015 9:55:29 AM.&lt;/p&gt;

&lt;p&gt;The connection string used (username/password are changed):&lt;br/&gt;
  mongodb://myuser:mypassword@10.0.0.8:27018,10.0.0.9:27018,10.0.0.10:27018/?w=majority;maxIdleTime=1m&lt;/p&gt;

&lt;p&gt;2 databases are used in the tests, querystore and streamstore. Every performance test they are recreated.	&lt;/p&gt;



&lt;p&gt;set1:PRIMARY&amp;gt; rs.status()&lt;br/&gt;
{&lt;br/&gt;
        &quot;set&quot; : &quot;set1&quot;,&lt;br/&gt;
        &quot;date&quot; : ISODate(&quot;2015-04-01T13:21:38.533Z&quot;),&lt;br/&gt;
        &quot;myState&quot; : 1,&lt;br/&gt;
        &quot;members&quot; : [&lt;br/&gt;
                &lt;/p&gt;
{
                        &quot;_id&quot; : 1,
                        &quot;name&quot; : &quot;10.0.0.8:27018&quot;,
                        &quot;health&quot; : 1,
                        &quot;state&quot; : 2,
                        &quot;stateStr&quot; : &quot;SECONDARY&quot;,
                        &quot;uptime&quot; : 136165,
                        &quot;optime&quot; : Timestamp(1427882148, 516),
                        &quot;optimeDate&quot; : ISODate(&quot;2015-04-01T09:55:48Z&quot;),
                        &quot;lastHeartbeat&quot; : ISODate(&quot;2015-04-01T13:21:37.619Z&quot;),
                        &quot;lastHeartbeatRecv&quot; : ISODate(&quot;2015-04-01T13:21:37.531Z&quot;
),
                        &quot;pingMs&quot; : 1,
                        &quot;syncingTo&quot; : &quot;10.0.0.10:27018&quot;,
                        &quot;configVersion&quot; : 199311
                }
&lt;p&gt;,&lt;br/&gt;
                &lt;/p&gt;
{
                        &quot;_id&quot; : 2,
                        &quot;name&quot; : &quot;10.0.0.9:27018&quot;,
                        &quot;health&quot; : 1,
                        &quot;state&quot; : 2,
                        &quot;stateStr&quot; : &quot;SECONDARY&quot;,
                        &quot;uptime&quot; : 11060,
                        &quot;optime&quot; : Timestamp(1427882148, 516),
                        &quot;optimeDate&quot; : ISODate(&quot;2015-04-01T09:55:48Z&quot;),
                        &quot;lastHeartbeat&quot; : ISODate(&quot;2015-04-01T13:21:37.593Z&quot;),
                        &quot;lastHeartbeatRecv&quot; : ISODate(&quot;2015-04-01T13:21:37.638Z&quot;
),
                        &quot;pingMs&quot; : 0,
                        &quot;syncingTo&quot; : &quot;10.0.0.10:27018&quot;,
                        &quot;configVersion&quot; : 199311
                }
&lt;p&gt;,&lt;/p&gt;
                {
                        &quot;_id&quot; : 3,
                        &quot;name&quot; : &quot;10.0.0.10:27018&quot;,
                        &quot;health&quot; : 1,
                        &quot;state&quot; : 1,
                        &quot;stateStr&quot; : &quot;PRIMARY&quot;,
                        &quot;uptime&quot; : 177917,
                        &quot;optime&quot; : Timestamp(1427882148, 516),
                        &quot;optimeDate&quot; : ISODate(&quot;2015-04-01T09:55:48Z&quot;),
                        &quot;electionTime&quot; : Timestamp(1427716586, 1),
                        &quot;electionDate&quot; : ISODate(&quot;2015-03-30T11:56:26Z&quot;),
                        &quot;configVersion&quot; : 199311,
                        &quot;self&quot; : true
                }
&lt;p&gt;        ],&lt;br/&gt;
        &quot;ok&quot; : 1&lt;br/&gt;
}&lt;/p&gt;</comment>
                            <comment id="870135" author="robkoenis" created="Wed, 1 Apr 2015 13:51:47 +0000"  >&lt;p&gt;Logs from the mongo servers added to issue&lt;/p&gt;</comment>
                            <comment id="870103" author="craiggwilson" created="Wed, 1 Apr 2015 13:05:56 +0000"  >&lt;p&gt;Hi Rob,&lt;/p&gt;

&lt;p&gt;First of all, thanks for using the new driver. It truly helps us put out a better product when it&apos;s tested...&lt;/p&gt;

&lt;p&gt;Second, I need some more information.&lt;/p&gt;

&lt;p&gt;1. Could you provide your connection string or in-code configuration?&lt;br/&gt;
2. Could you provide the output of rs.config() from the shell?&lt;br/&gt;
3. Could you provide the log files from your replica set members?&lt;/p&gt;

&lt;p&gt;If you are uncomfortable providing any of this publicly, we can move this to a private ticket.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Craig&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="69375" name="serverlogs.zip" size="2395012" author="robkoenis" created="Wed, 1 Apr 2015 13:51:47 +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|hs7ozr:</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>