<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:56:31 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>[JAVA-2172] When Mongo is down, Hystrix circuit breaker won&apos;t open.</title>
                <link>https://jira.mongodb.org/browse/JAVA-2172</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Hello,&lt;br/&gt;
I&apos;m using Java Driver Rx (v1.2.0) with MongoDB (v3.2.1).&lt;br/&gt;
I&apos;m caching Mongo clients. When the first call to db is made, the client is created and makes the call. &lt;br/&gt;
Then, when Mongo goes down and I try to use this cached client, all subsequent requests are &quot;hanging&quot; (because they&apos;re queued in the client). This behaviour causes hystrix command timeout.&lt;br/&gt;
Since it doesn&apos;t timeout or throw any exceptions (it just hangs), therefore the circuit breaker won&apos;t open.&lt;/p&gt;</description>
                <environment></environment>
        <key id="281017">JAVA-2172</key>
            <summary>When Mongo is down, Hystrix circuit breaker won&apos;t open.</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="bszwej">Bart?omiej Szwej</reporter>
                        <labels>
                    </labels>
                <created>Wed, 20 Apr 2016 08:53:13 +0000</created>
                <updated>Wed, 11 Sep 2019 19:13:38 +0000</updated>
                            <resolved>Thu, 15 Sep 2016 17:29:00 +0000</resolved>
                                                                    <component>Async</component>
                    <component>Configuration</component>
                                        <votes>2</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="1241296" author="ross@10gen.com" created="Wed, 20 Apr 2016 15:06:25 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=DamianJ&quot; class=&quot;user-hover&quot; rel=&quot;DamianJ&quot;&gt;DamianJ&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;The MongoClient won&apos;t throw an exception as the connection pool is designed to be self healing across ReplicaSet reelections etc. However, when calling operations it should return an error to the callback, I&apos;m going to try and reproduce your scenario with a quick test case for this and come back to you.&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                            <comment id="1241044" author="damianj" created="Wed, 20 Apr 2016 11:52:03 +0000"  >&lt;p&gt;Hi Ross,&lt;/p&gt;

&lt;p&gt;I&apos;m working on it with Bartek.&lt;/p&gt;

&lt;p&gt;We&apos;ve tried with these setting and with many more and we couldn&apos;t find any configuration that cause MongoClient to throw an exception or fail an operation in any way.&lt;br/&gt;
We&apos;ve tested it with Async driver and we don&apos;t get any feedback in the callback. No result. No error. With this it&apos;s difficult to be responsive.&lt;br/&gt;
Another thing is that operations are queued and performed later when Mongo is up again. Might lead to inconsistency in our data.&lt;/p&gt;

&lt;p&gt;Best Regards,&lt;br/&gt;
Damian&lt;/p&gt;</comment>
                            <comment id="1241013" author="ross@10gen.com" created="Wed, 20 Apr 2016 10:52:50 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bszwej&quot; class=&quot;user-hover&quot; rel=&quot;bszwej&quot;&gt;bszwej&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;I think it will be down to a configuration issue of the MongoClient, as there are some timeouts incase a MongoD goes down:&lt;/p&gt;

&lt;p&gt;These can be configured via: &lt;a href=&quot;http://api.mongodb.org/java/3.2/?com/mongodb/async/client/MongoClientSettings.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;MongoClientSettings&lt;/a&gt;&lt;br/&gt;
Two configurations are of note: &lt;br/&gt;
  1) &lt;a href=&quot;http://api.mongodb.org/java/3.2/com/mongodb/connection/SocketSettings.Builder.html#connectTimeout-int-java.util.concurrent.TimeUnit-&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;SocketSettings.Builder#connectTimeout&lt;/a&gt; The socket connect timeout - defaults to 10,000MS&lt;br/&gt;
  2) &lt;a href=&quot;http://api.mongodb.org/java/3.2/com/mongodb/connection/ClusterSettings.Builder.html#serverSelectionTimeout-long-java.util.concurrent.TimeUnit-&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ClusterSettings.Builderl#serverSelectionTimeout&lt;/a&gt; the timeout to apply when selecting a server from the connection pool - defaults to 30,000MS&lt;/p&gt;

&lt;p&gt;So any requests after the Java Driver will wait for these timeouts before throwing an error. Is the hystrix timeout shorter? That would account for it timing out. &lt;/p&gt;

&lt;p&gt;For future reference this project is for Java driver bugs or feature requests and the best place for questions regarding MongoDB usage or the Java driver specifics is the &lt;a href=&quot;https://groups.google.com/forum/#!forum/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongodb-user mailing list&lt;/a&gt; or &lt;a href=&quot;http://stackoverflow.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;stackoverflow&lt;/a&gt; as you will reach a boarder audience there.  If your business requires an answer from MongoDB within a set time frame then we do offer &lt;a href=&quot;https://www.mongodb.com/products/production-support&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;production support&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                            <comment id="1240969" author="bszwej" created="Wed, 20 Apr 2016 09:03:15 +0000"  >&lt;p&gt;In other words, we expect the driver to throw exceptions when Mongo is down, but not queue up the requests.&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|hskm0f:</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>