<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:43:07 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-2647] Queries hit maximum document size</title>
                <link>https://jira.mongodb.org/browse/CSHARP-2647</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;In a few cases, we are seeing max document size errors when querying mongo. The only way we have found to resolve this is to manually change the cursor batch size for the failing queries. We are having to calculate this value ourselves based on our own knowledge of the expected maximum document size for particular collections. We would expect that this would be handled automatically in the driver (or server?)&lt;/p&gt;</description>
                <environment></environment>
        <key id="811454">CSHARP-2647</key>
            <summary>Queries hit maximum document size</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="benb7760">Ben Brockway</reporter>
                        <labels>
                    </labels>
                <created>Mon, 24 Jun 2019 09:31:20 +0000</created>
                <updated>Thu, 31 Mar 2022 00:34:44 +0000</updated>
                                            <version>2.7.3</version>
                                                    <component>Wire Protocol</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2304834" author="benb7760" created="Fri, 28 Jun 2019 15:54:12 +0000"  >&lt;p&gt;Great, thanks Robert. We will apply this fix on our end&lt;/p&gt;</comment>
                            <comment id="2304798" author="rstam" created="Fri, 28 Jun 2019 15:38:29 +0000"  >&lt;p&gt;I reproduced it using a Find. I&apos;m sure it can be reproduced using an Aggregate as well.&lt;/p&gt;

&lt;p&gt;The key is that there must be enough documents returned to require at least two batches be returned from the server.&lt;/p&gt;

&lt;p&gt;The easiest workaround for you in the short term is to remove the line of code that is setting &lt;tt&gt;MaxDocumentSize&lt;/tt&gt;&#160;to &lt;tt&gt;16777216&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;I&apos;m going to leave this ticket open and classified as a bug, since the driver should not be using &lt;tt&gt;BsonDefaults.MaxDocumentSize&lt;/tt&gt; here. It should use a different value that is correct for this particular server response.&lt;/p&gt;

&lt;p&gt;Thanks for your help!&lt;/p&gt;</comment>
                            <comment id="2304783" author="benb7760" created="Fri, 28 Jun 2019 15:32:10 +0000"  >&lt;p&gt;We do have a line like that yes, see below. This particular exception came from the result of an aggregation, however I am certain we have also seen this on a regular find query. I will attempt to make a reproduction soon.&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;   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;BsonDefaults.MaxDocumentSize = 16 &amp;lt;&amp;lt; 20&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="2304611" author="rstam" created="Fri, 28 Jun 2019 14:05:32 +0000"  >&lt;p&gt;Would you happen to have a line like this in your program?&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;   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;BsonDefaults.MaxDocumentSize&#160;=&#160;&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;16777216&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;;&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;I can reproduce this issue if I include this line.&lt;/p&gt;</comment>
                            <comment id="2304589" author="rstam" created="Fri, 28 Jun 2019 13:50:59 +0000"  >&lt;p&gt;From the stack trace I can tell you are doing&#160; a &lt;tt&gt;ForEachAsync&lt;/tt&gt; on a cursor, but I can&apos;t tell what kind of query you used to get the cursor. Knowing whether it was a regular find or an aggregation might help in reproducing this. Anything else you can think of to help me reproduce this would be great also.&lt;/p&gt;</comment>
                            <comment id="2304533" author="rstam" created="Fri, 28 Jun 2019 13:17:41 +0000"  >&lt;p&gt;Thanks for the stack trace. That&apos;s very helpful information.&lt;/p&gt;

&lt;p&gt;I haven&apos;t been able to reproduce this yet, but it definitely seems like a legitimate issue. Do you have any sense for what document size I could use to reproduce this?&lt;/p&gt;</comment>
                            <comment id="2304496" author="benb7760" created="Fri, 28 Jun 2019 12:39:30 +0000"  >&lt;p&gt;We have upgraded to 2.8.1 and can confirm that the issue is present in this release also&lt;/p&gt;</comment>
                            <comment id="2296206" author="benb7760" created="Tue, 25 Jun 2019 08:59:01 +0000"  >&lt;p&gt;Hi Robert, apologies, thought I had included this originally. Here it is:&#160;&lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/attachment/221914/221914_trace.txt&quot; title=&quot;trace.txt attached to CSHARP-2647&quot;&gt;trace.txt&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.mongodb.org/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</comment>
                            <comment id="2294719" author="rstam" created="Mon, 24 Jun 2019 14:38:16 +0000"  >&lt;p&gt;Could you please provide a stack trace so that we can determine where exactly this happened.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="221914" name="trace.txt" size="3210" author="benb7760" created="Tue, 25 Jun 2019 08:58:34 +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|huvrnj:</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>