<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:10:35 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>[SERVER-6036] Disable cursor timeout for cursors that belong to a session</title>
                <link>https://jira.mongodb.org/browse/SERVER-6036</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When a cursor is opened as part of a session, its lifetime will be tied to that session. Closing or timing out of a session will kill all associated cursors. Given this, we can remove the separate cursor timeout mechanism for cursors that live as part of a session, and rely on session cleanup to handle cleanup of orphaned cursors.&lt;/p&gt;</description>
                <environment></environment>
        <key id="40702">SERVER-6036</key>
            <summary>Disable cursor timeout for cursors that belong to a session</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="james.wahlin@mongodb.com">James Wahlin</assignee>
                                    <reporter username="greg_10gen">Greg Studer</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Jun 2012 18:03:33 +0000</created>
                <updated>Mon, 19 Dec 2022 20:32:54 +0000</updated>
                            <resolved>Mon, 9 Nov 2020 17:19:11 +0000</resolved>
                                                    <fixVersion>4.9.0</fixVersion>
                    <fixVersion>4.4.8</fixVersion>
                                    <component>Sharding</component>
                                        <votes>46</votes>
                                    <watches>74</watches>
                                                                                                                <comments>
                            <comment id="3964113" author="xgen-internal-githook" created="Mon, 26 Jul 2021 21:17:32 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;James Wahlin&apos;, &apos;email&apos;: &apos;james@mongodb.com&apos;, &apos;username&apos;: &apos;jameswahlin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6036&quot; title=&quot;Disable cursor timeout for cursors that belong to a session&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6036&quot;&gt;&lt;del&gt;SERVER-6036&lt;/del&gt;&lt;/a&gt; Adjust tests for cursor timeout to disable implicit session creation&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 317132d60584706c660164f74f51b81015ecdd72)&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/85938f0ae7c81ecca90bdfd6addd2d9446cf0d3d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/85938f0ae7c81ecca90bdfd6addd2d9446cf0d3d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3964112" author="xgen-internal-githook" created="Mon, 26 Jul 2021 21:17:27 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;George Wangensteen&apos;, &apos;email&apos;: &apos;george.wangensteen@mongodb.com&apos;, &apos;username&apos;: &apos;gewa24&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6036&quot; title=&quot;Disable cursor timeout for cursors that belong to a session&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6036&quot;&gt;&lt;del&gt;SERVER-6036&lt;/del&gt;&lt;/a&gt; Disable cursor timeout for cursors that belong to a session&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 920493f0c2b32fa43743934f6025790e7cf496e1)&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/fc1eff70e7ce3f0dd53b884246723982fe6b6aac&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/fc1eff70e7ce3f0dd53b884246723982fe6b6aac&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3964110" author="xgen-internal-githook" created="Mon, 26 Jul 2021 21:17:17 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;James Wahlin&apos;, &apos;email&apos;: &apos;james@mongodb.com&apos;, &apos;username&apos;: &apos;jameswahlin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6036&quot; title=&quot;Disable cursor timeout for cursors that belong to a session&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6036&quot;&gt;&lt;del&gt;SERVER-6036&lt;/del&gt;&lt;/a&gt; Disable cursor timeout for cursors that belong to a session&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 25007083358b088afcc250969c1504840105ac5d)&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/mongo-enterprise-modules/commit/249c9c864a3885f5f46d0b14209b8ec92cc5ec42&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo-enterprise-modules/commit/249c9c864a3885f5f46d0b14209b8ec92cc5ec42&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3481568" author="xgen-internal-githook" created="Mon, 9 Nov 2020 15:07:02 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;James Wahlin&apos;, &apos;email&apos;: &apos;james@mongodb.com&apos;, &apos;username&apos;: &apos;jameswahlin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6036&quot; title=&quot;Disable cursor timeout for cursors that belong to a session&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6036&quot;&gt;&lt;del&gt;SERVER-6036&lt;/del&gt;&lt;/a&gt; Adjust tests for cursor timeout to disable implicit session creation&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/317132d60584706c660164f74f51b81015ecdd72&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/317132d60584706c660164f74f51b81015ecdd72&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3481567" author="xgen-internal-githook" created="Mon, 9 Nov 2020 15:06:57 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;George Wangensteen&apos;, &apos;email&apos;: &apos;george.wangensteen@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6036&quot; title=&quot;Disable cursor timeout for cursors that belong to a session&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6036&quot;&gt;&lt;del&gt;SERVER-6036&lt;/del&gt;&lt;/a&gt; Disable cursor timeout for cursors that belong to a session&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/920493f0c2b32fa43743934f6025790e7cf496e1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/920493f0c2b32fa43743934f6025790e7cf496e1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3481566" author="xgen-internal-githook" created="Mon, 9 Nov 2020 15:06:52 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;James Wahlin&apos;, &apos;email&apos;: &apos;james@mongodb.com&apos;, &apos;username&apos;: &apos;jameswahlin&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6036&quot; title=&quot;Disable cursor timeout for cursors that belong to a session&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6036&quot;&gt;&lt;del&gt;SERVER-6036&lt;/del&gt;&lt;/a&gt; Disable cursor timeout for cursors that belong to a session&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/mongo-enterprise-modules/commit/25007083358b088afcc250969c1504840105ac5d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo-enterprise-modules/commit/25007083358b088afcc250969c1504840105ac5d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3299343" author="james.wahlin@10gen.com" created="Thu, 23 Jul 2020 18:05:50 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rj-10gen%40arsynet.com&quot; class=&quot;user-hover&quot; rel=&quot;rj-10gen@arsynet.com&quot;&gt;rj-10gen@arsynet.com&lt;/a&gt;, I agree that with session timeout killing associated cursors, the need for a separate cursor timeout mechanism makes less sense. We will repurpose this ticket to remove the timeout mechanism for any cursor that is opened as part of a session.&lt;/p&gt;</comment>
                            <comment id="3208286" author="rj-10gen@arsynet.com" created="Mon, 15 Jun 2020 16:04:21 +0000"  >&lt;p&gt;Following &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-46918&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-46918&lt;/a&gt;&#160;and cursors timeout...&#160; I was wondering...&lt;/p&gt;

&lt;p&gt;Now that we have sessions and that when a session expires, cursors associated with this session also expire, why do we still need to have a specific expiration for cursors.&lt;/p&gt;

&lt;p&gt;There is already a mechanism to refresh sessions, perhaps it should be enough if cursors had no specific expiration period?&lt;/p&gt;</comment>
                            <comment id="2887187" author="philip@firstorder.io" created="Thu, 20 Feb 2020 19:26:22 +0000"  >&lt;p&gt;Thanks for the snippet. Your pipeline will run very fast if you add proper indexing on the collection. I usually use Studio3T to add indexes on sorting and group field.&lt;/p&gt;

&lt;p&gt;I ended up executing my batches filtered by another field that I know it won&apos;t return more than 100.000 rows for memory efficiency.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;


&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;execute a pipeline to get distinct folderIDs (I don&apos;t have more than &lt;/span&gt;&lt;span style=&quot;color: #009900; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;100.000&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; folders)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; each folderID in folderIDs {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; get cursor from aggregate pipeline filtered on folderID (easy to index)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&#160; decode results in &amp;amp;files slice using .All() method (a folder doesn&apos;t contain more than &lt;/span&gt;&lt;span style=&quot;color: #009900; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;100.000&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; files)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="2886413" author="justin@glassraven.com" created="Thu, 20 Feb 2020 13:35:46 +0000"  >&lt;p&gt;Philip, I tried your suggestion and used limit and skip to split my aggregate query to work around this.&#160; Like you say not as efficient but it means I can still use my aggregate query.&lt;/p&gt;

&lt;p&gt;Here&apos;s a snippet of my go code in case it&apos;s useful for anyone:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// Due to this mongoDB limitation: https://jira.mongodb.org/browse/SERVER-6036 it isn&apos;t possible to set cursor keep alive for aggregation queries so we have to use skip and limit to grab a chunk at a time&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;	skip := 0&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;	limit := 10000&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;	aggregateOptions := options.Aggregate().SetAllowDiskUse(true)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;	for processed &amp;lt; total {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;		log.Printf(&quot;Skipping %d, fetching next %d search terms&quot;, skip, limit)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;		pipeline := []bson.M{&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;			bson.M{&quot;$match&quot;: query},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;			bson.M{&quot;$group&quot;: bson.M{&quot;_id&quot;: bson.M{&quot;language&quot;: &quot;$language&quot;, &quot;searchTerm&quot;: &quot;$searchTerm&quot;}}},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;			bson.M{&quot;$sort&quot;: bson.M{&quot;_id.searchTerm&quot;: 1}},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;			bson.M{&quot;$skip&quot;: skip},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;			bson.M{&quot;$limit&quot;: limit},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;		}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;		cur, err := collection.Aggregate(ctx, pipeline, aggregateOptions)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;		if err != nil {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;			return err&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;		}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;		skip += limit&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;		defer cur.Close(ctx)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;		for cur.Next(ctx) {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;...&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                            <comment id="2771758" author="philip@firstorder.io" created="Thu, 30 Jan 2020 00:01:47 +0000"  >&lt;p&gt;I was thinking of using limit and skip to split a long running aggregate query into multiple ones, similar to pagination. The problem is that the sorting queries will then have to be newly executed for each page which is less efficient. On the other hand I could solve the idle timeout problem.&lt;/p&gt;

&lt;p&gt;Anyone who tried to do this too?&lt;/p&gt;</comment>
                            <comment id="2240132" author="tlane" created="Thu, 9 May 2019 16:16:54 +0000"  >&lt;p&gt;Has there been any progress on this issue, or an ETA?&lt;/p&gt;

&lt;p&gt;I can confirm this seems to be happening on a sharded cluster for large data sets.&lt;/p&gt;

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

&lt;p&gt;Using &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-8188&quot; title=&quot;Configurable idle cursor timeout&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-8188&quot;&gt;&lt;del&gt;SERVER-8188&lt;/del&gt;&lt;/a&gt; as a SW solution seems to be a bit extreme... and for a large corporate environment is rather infeasible.&lt;br/&gt;
We&apos;d like to be able to extend the timeout to an hour for 1 or 2 queries, not for the entire daemon. Is there anything impeding a fix for this issue?&lt;br/&gt;
&amp;#8211;&lt;/p&gt;</comment>
                            <comment id="1535456" author="oleg@evergage.com" created="Tue, 28 Mar 2017 21:51:44 +0000"  >&lt;p&gt;J&#246;rg, the only practical solution seems to increase the cursorTimeoutMillis parameter (see &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-8188&quot; title=&quot;Configurable idle cursor timeout&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-8188&quot;&gt;&lt;del&gt;SERVER-8188&lt;/del&gt;&lt;/a&gt; for more info). The default value is 10 minutes. By running values of 60 or 80 minutes, you might find that all your aggregations complete.&lt;/p&gt;

&lt;p&gt;The problem is that the cursor times out individually on a single server, if during the aggregation no documents are fetched for 10 minutes from that shard. This kills the entire fetch of a query or aggregation results.&lt;/p&gt;</comment>
                            <comment id="1534560" author="joerg.rech" created="Tue, 28 Mar 2017 07:39:36 +0000"  >&lt;p&gt;Aggregation of medium datasets (40 million) in clusters is still a problem with 3.4.2. When aggregating we get the following error after ~2 hours:&lt;/p&gt;

&lt;p&gt;An exception occurred while aggregating data com.mongodb.CommandFailureException: &lt;/p&gt;
{ &quot;serverUsed&quot; : &quot;xxx.xxx.xxx.xxx:27017&quot; , &quot;ok&quot; : 0.0 , &quot;errmsg&quot; : &quot;cursor id 51287731144 didn&apos;t exist on server.&quot; , &quot;code&quot; : 13127 , &quot;codeName&quot; : &quot;Location13127&quot;}

&lt;p&gt;The same aggregation works for datasets with 20 million documents and takes ~60 minutes. &lt;/p&gt;

&lt;p&gt;Is there any solution or workaround that could help? Is it just aggregation or could a map/reduce help? Is a solution planned for an upcoming release?&lt;/p&gt;

&lt;p&gt;Btw. we also have datasets with 400 million and 3 billion documents that should be processed by this aggregation (even if it would take days or weeks) - so if someone is working on a solution please keep users like us in mind.&lt;/p&gt;</comment>
                            <comment id="1484172" author="royrez@microsoft.com" created="Tue, 24 Jan 2017 19:48:37 +0000"  >&lt;p&gt;The noTimeout option is not applicable here, since he presented an aggregation - that&apos;s an operation that does not support the noTimeout option.&lt;br/&gt;
So currently the only workaround is to set the timeout for the entire mongod? Is that a joke or are you serious?&lt;/p&gt;</comment>
                            <comment id="1039607" author="ramon.fernandez" created="Tue, 22 Sep 2015 12:49:25 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=robinyarbrough%40carfax.com&quot; class=&quot;user-hover&quot; rel=&quot;robinyarbrough@carfax.com&quot;&gt;robinyarbrough@carfax.com&lt;/a&gt;, unfortunately there are no updates on this issue. &lt;del&gt;One can use the &lt;a href=&quot;https://docs.mongodb.org/manual/core/cursors/#closure-of-inactive-cursors&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;noTimeout&lt;/tt&gt; option&lt;/a&gt;&lt;/del&gt;, or as Dan mentioned above, a workaround may be possible with &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-8188&quot; title=&quot;Configurable idle cursor timeout&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-8188&quot;&gt;&lt;del&gt;SERVER-8188&lt;/del&gt;&lt;/a&gt;. We&apos;ll update this ticket when it gets considered for planning.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;EDIT&lt;/b&gt;&lt;br/&gt;
I&apos;m correcting my previous message because one can&apos;t use &lt;tt&gt;noTimeout&lt;/tt&gt; for aggregation operations &amp;#8211; apologies for the confusion.&lt;/p&gt;</comment>
                            <comment id="1038226" author="robinyarbrough@carfax.com" created="Mon, 21 Sep 2015 13:37:10 +0000"  >&lt;p&gt;We are also experiencing this issue when running a long running aggregation query. These particular aggregation queries finished successfully until we upgraded to 3.0.4 from 2.6.7.  We keep getting the following error after running for several days. &quot;exception: getMore: cursor didn&apos;t exist on server, possible restart or timeout?&quot; Are there any updates on this issue?&lt;/p&gt;</comment>
                            <comment id="1006379" author="chengas123" created="Fri, 14 Aug 2015 23:53:59 +0000"  >&lt;p&gt;Can we allow the cursor timeout to be configured on a per-cursor basis instead of per-server basis? Queries have a no timeout option, but that&apos;s much too extreme. I just want to set it to something like 1 hour on a couple of them (not for all of them as that&apos;s quite extreme as well!)&lt;/p&gt;</comment>
                            <comment id="915631" author="ian@10gen.com" created="Fri, 15 May 2015 20:35:47 +0000"  >&lt;p&gt;intentionally expanding the scope of this ticket to cover all work on cursor keepAlive.&lt;/p&gt;</comment>
                            <comment id="871075" author="dan@10gen.com" created="Thu, 2 Apr 2015 03:06:55 +0000"  >&lt;p&gt;This issue can be worked around now with &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-8188&quot; title=&quot;Configurable idle cursor timeout&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-8188&quot;&gt;&lt;del&gt;SERVER-8188&lt;/del&gt;&lt;/a&gt; which allows the cursor timeout to be configured, which is in 2.6.9 and is in the upcoming 3.0.2 server releases&lt;/p&gt;</comment>
                            <comment id="745861" author="akozak" created="Tue, 21 Oct 2014 01:20:41 +0000"  >&lt;p&gt;See &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-15042&quot; title=&quot;Add noCursorTimeout option to command cursors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-15042&quot;&gt;&lt;del&gt;SERVER-15042&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="745691" author="akozak" created="Mon, 20 Oct 2014 20:35:44 +0000"  >&lt;p&gt;Hi,&lt;br/&gt;
We have the same issue, it looks like aggregation framework doesn&apos;t accept &quot;noTimeout&quot; parameter (it helps for usual long running queries).&lt;br/&gt;
I recommend to change issue type from &quot;Improvement&quot; to &quot;Bug&quot;, I&apos;m sure it affects a lot of users:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db.works.aggregate([&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;       {$match:{&quot;udate&quot;:{$gte:&quot;1412467200000&quot;}}},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;       {&quot;$group&quot;:{&quot;_id&quot;:&quot;$udate&quot;, &quot;count&quot;:{$sum:1}}}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;],&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{allowDiskUse : true},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{$out : &quot;works_aggregate&quot;})&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;.addOption(DBQuery.Option.noTimeout);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;MongoDB shell version: 2.6.1&lt;br/&gt;
connecting to: test&lt;br/&gt;
assert: command failed: {&lt;br/&gt;
        &quot;errmsg&quot; : &quot;exception: getMore: cursor didn&apos;t exist on server, possible restart or timeout?&quot;,&lt;br/&gt;
        &quot;code&quot; : 13127,&lt;br/&gt;
        &quot;ok&quot; : 0&lt;br/&gt;
} : aggregate failed&lt;br/&gt;
Error: command failed: {&lt;br/&gt;
        &quot;errmsg&quot; : &quot;exception: getMore: cursor didn&apos;t exist on server, possible restart or timeout?&quot;,&lt;br/&gt;
        &quot;code&quot; : 13127,&lt;br/&gt;
        &quot;ok&quot; : 0&lt;br/&gt;
} : aggregate failed&lt;br/&gt;
    at Error (&amp;lt;anonymous&amp;gt;)&lt;br/&gt;
    at doassert (src/mongo/shell/assert.js:11:14)&lt;br/&gt;
    at Function.assert.commandWorked (src/mongo/shell/assert.js:244:5)&lt;br/&gt;
    at DBCollection.aggregate (src/mongo/shell/collection.js:1149:12)&lt;br/&gt;
    at group_works.js:21:19&lt;br/&gt;
2014-10-18T11:23:47.463-0400 Error: command failed: {&lt;br/&gt;
        &quot;errmsg&quot; : &quot;exception: getMore: cursor didn&apos;t exist on server, possible restart or timeout?&quot;,&lt;br/&gt;
        &quot;code&quot; : 13127,&lt;br/&gt;
        &quot;ok&quot; : 0&lt;br/&gt;
} : aggregate failed at src/mongo/shell/assert.js:13&lt;/p&gt;</comment>
                            <comment id="741766" author="paramnemmini" created="Wed, 15 Oct 2014 15:40:59 +0000"  >&lt;p&gt;I have the same issue. For now I have removed the shards. But the aggregation pipeline is taking more that 3 hours for me with 200 million records. Steven, how did you get the result in 13 minutes for 226 million? Is your machine really powerful? &lt;/p&gt;</comment>
                            <comment id="741462" author="scastelein" created="Wed, 15 Oct 2014 08:25:20 +0000"  >&lt;p&gt;Any update on this issue? I&apos;m running an aggregation pipeline on a bigdataset (226million records) that performed perfectly on a single mongodb instance (finished in 13 minutes , which impressed me a lot). Then I setup a cluster of 4 shards and ran the aggregate again, hoping to see some performance increase, however I got the same error as described in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-13358&quot; title=&quot;long aggregation queries get a cursor timeout error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-13358&quot;&gt;&lt;del&gt;SERVER-13358&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Not only running the query took longer (perhaps a fault on my side) it didn&apos;t even finish! I don&apos;t understand that these problems arise, because running a long aggregation pipeline on large datasets is exactly what MongoDB is designed for?&lt;/p&gt;</comment>
                            <comment id="718357" author="tubededentifrice" created="Sat, 13 Sep 2014 11:59:55 +0000"  >&lt;p&gt;I falling into this... I simply can&apos;t run a (big) aggregation query on my DB.&lt;br/&gt;
Is there any work around?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="1791180">SERVER-57863</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="206759">PYTHON-938</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                        <issuelink>
            <issuekey id="1537217">DOCS-13976</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="48695">SERVER-6906</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="127766">SERVER-13358</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1791180">SERVER-57863</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="633565">SERVER-38123</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1277992">SERVER-46918</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1275334">SERVER-46885</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="166608">SERVER-15895</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="29314">SERVER-4800</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="318819">SERVER-26321</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="154831">SERVER-15042</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="2005109">DOCS-15181</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1859892">SERVER-59573</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1643188">DRIVERS-1602</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="163010">DOCS-4164</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="331361">SERVER-27009</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="61929">SERVER-8188</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>25.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="18953"><![CDATA[v4.4]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[500A000000X2mk9IAB, 500A000000XOmw9IAD, 500A000000UaYY5IAN, 500A000000Zpsr3IAB, 500A000000arI1jIAE, 500A000000bWTKdIAO, 500A000000b7ny9IAA, 500A000000cSB7dIAG, 500A000000Z1wtcIAB, 5002K00000dFtbzQAC, 5002K00000obdykQAA, 5002K00000sdu1qQAA, 5002K00000vgc6pQAA, 5006R00001ooll2QAA]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 8 Mar 2013 17:07:21 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 28 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_17052" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Downstream Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>When a query cursor is opened under a session, it will no longer be eligible for timeout after 10 minutes of activity. Instead, we will rely on session timeout to kill any orphaned or inactive cursors. By default sessions time out 30 minutes after its most recent use or the last &amp;#39;refreshSessions&amp;#39; command invocation for that session.&lt;br/&gt;
&lt;br/&gt;
Please note that any query cursor opened outside of a session will still be subject to the 10 minute inactivity timeout.</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16942"><![CDATA[Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2083</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 28 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>50.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>tlane</customfieldvalue>
            <customfieldvalue>akozak</customfieldvalue>
            <customfieldvalue>chengas123</customfieldvalue>
            <customfieldvalue>dan@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>greg_10gen</customfieldvalue>
            <customfieldvalue>ian@mongodb.com</customfieldvalue>
            <customfieldvalue>james.wahlin@mongodb.com</customfieldvalue>
            <customfieldvalue>joerg.rech</customfieldvalue>
            <customfieldvalue>justin@glassraven.com</customfieldvalue>
            <customfieldvalue>oleg@evergage.com</customfieldvalue>
            <customfieldvalue>paramnemmini</customfieldvalue>
            <customfieldvalue>philip@firstorder.io</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
            <customfieldvalue>rj-10gen@arsynet.com</customfieldvalue>
            <customfieldvalue>robinyarbrough@carfax.com</customfieldvalue>
            <customfieldvalue>royrez@microsoft.com</customfieldvalue>
            <customfieldvalue>scastelein</customfieldvalue>
            <customfieldvalue>tubededentifrice</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hro0of:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr4ypr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>105393</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3617">Query 2020-10-19</customfieldvalue>
    <customfieldvalue id="3619">Query 2020-11-16</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_17051" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Teams Impacted</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16943"><![CDATA[Cloud]]></customfieldvalue>
    <customfieldvalue key="16944"><![CDATA[Docs]]></customfieldvalue>
    <customfieldvalue key="16945"><![CDATA[Drivers]]></customfieldvalue>
    <customfieldvalue key="16946"><![CDATA[Triage and Release]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hsa247:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>