<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:38:28 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-1021] Memory usages on Client grows without limit</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1021</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;While using InsertBatch to insert 100,000 documents of between .5mb and 10mb in size the memory usage grows with out bound, reaching the system size of 32GB and then slowly stops writing to Mongo. When commenting out the specifc mongo code, memory usage stays within 500k for the entire set. the Specific mongos is a sharded cluster but the shards all reside on the same machine. &lt;/p&gt;

&lt;p&gt;When tracing through the Source Code from the Official C# API I was unable to locate any obvious issues. Although, there are several delayed LINQ casts and copying of memory that could lead to &quot;confusion&quot; in the Framework. It could possibly be an issue with LINQ and .NET but if that were the case then removing the LINQ and additional copying would likely resolve the issue as well. &lt;/p&gt;

&lt;p&gt;The Attached code file operates in two threads. The primary thread loads an XML files from the file system (300) of them and for each file changes the date, one for each day of 2014. This then queues the Documents to a Task which spins and calls Mongo InsertBatch every time the queue is larger than 100 items. The document size ranges from 3kb to 10KB on disk, so slightly smaller when converted to BSON. &lt;/p&gt;</description>
                <environment>Windows 7 Professional, 32GB ram, Visual Studio 2012 C#</environment>
        <key id="150296">CSHARP-1021</key>
            <summary>Memory usages on Client grows without limit</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="5">Cannot Reproduce</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="ennis.lynch@fpl.com">Ennis Lynch</reporter>
                        <labels>
                    </labels>
                <created>Thu, 31 Jul 2014 17:10:06 +0000</created>
                <updated>Mon, 4 Apr 2016 23:27:31 +0000</updated>
                            <resolved>Mon, 4 Apr 2016 23:27:31 +0000</resolved>
                                    <version>1.9.2</version>
                                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="677882" author="ennis.lynch@fpl.com" created="Thu, 31 Jul 2014 18:28:52 +0000"  >&lt;p&gt;I searched leak but nothing showed up, I thought it might be already reported. We are porting the code I have now to Java to see if the same dataset will cause the same issue in Java. My speculation is that it revolves around the multiple array copies and casts that occur behind the scenes. documents.Cast&amp;lt;object&amp;gt;() from Insert batch is not evaluated until enumerated in according to the .NET documentation, however, if you trace through the code there is a nest of such operations, including lambda expressions.&lt;/p&gt;

&lt;p&gt;I am not able to provide you with the dataset because of information security, however, if you are unable to duplicate from the code and information I provided I can probably &quot;fake&quot; the data and provide a copy. &lt;/p&gt;</comment>
                            <comment id="677873" author="craiggwilson" created="Thu, 31 Jul 2014 18:23:20 +0000"  >&lt;p&gt;Thanks Ennis,&lt;/p&gt;

&lt;p&gt;I&apos;ve linked a duplicate entry. I&apos;ve attempted to reproduce and track this down before with no avail. Perhaps your additional information will provide some more information.&lt;/p&gt;

&lt;p&gt;Craig&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="109165">CSHARP-904</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="48994" name="releventCode.cs" size="4414" author="ennis.lynch@fpl.com" created="Thu, 31 Jul 2014 17:10:06 +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|hs10dz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>130375</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>