<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:03:19 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-3528] memory footprint of JS context keeps increasing as it is used</title>
                <link>https://jira.mongodb.org/browse/SERVER-3528</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;This was easily reproducible with M/R.&lt;br/&gt;
The easy workaround is to disable JS scope caching.&lt;br/&gt;
In scripting/engine.cpp, line 266:&lt;/p&gt;

&lt;p&gt;            if ( l.size() &amp;gt; 10 ) &lt;/p&gt;
{
                delete s;
            }

&lt;p&gt;for&lt;/p&gt;

&lt;p&gt;            if ( true )&lt;br/&gt;
                delete s;&lt;br/&gt;
            }&lt;/p&gt;

&lt;p&gt;It could be due to:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;us not doing cleanup of certain JS objects, but then we would hit an OOM from JS&lt;/li&gt;
	&lt;li&gt;JS objects that are very small but point to large BSON data that is not reclaimed. Still should be cleared when GCing.&lt;/li&gt;
	&lt;li&gt;leak / fragmentation in SM heap.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="20462">SERVER-3528</key>
            <summary>memory footprint of JS context keeps increasing as it is used</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="antoine">Antoine Girbal</assignee>
                                    <reporter username="antoine">Antoine Girbal</reporter>
                        <labels>
                    </labels>
                <created>Wed, 3 Aug 2011 19:24:51 +0000</created>
                <updated>Tue, 12 Jul 2016 00:18:24 +0000</updated>
                            <resolved>Tue, 15 Nov 2011 17:37:01 +0000</resolved>
                                                    <fixVersion>2.0.2</fixVersion>
                    <fixVersion>2.1.0</fixVersion>
                                    <component>JavaScript</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="66856" author="auto" created="Tue, 15 Nov 2011 17:37:01 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;agirbal&apos;, u&apos;name&apos;: u&apos;agirbal&apos;, u&apos;email&apos;: u&apos;antoine@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3528&quot; title=&quot;memory footprint of JS context keeps increasing as it is used&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3528&quot;&gt;&lt;del&gt;SERVER-3528&lt;/del&gt;&lt;/a&gt;: memory footprint of JS context keeps increasing as it is used, delete every 100 use&lt;br/&gt;
Branch: v2.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/84a3d7aa3dcb9aef261a365daa862d82d1ba513e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/84a3d7aa3dcb9aef261a365daa862d82d1ba513e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="66836" author="antoine" created="Tue, 15 Nov 2011 17:08:54 +0000"  >&lt;p&gt;reopen for backport&lt;/p&gt;</comment>
                            <comment id="62000" author="antoine" created="Sat, 22 Oct 2011 06:48:31 +0000"  >&lt;p&gt;it would be great to backport to 2.0.&lt;br/&gt;
Many people will hit OOM from JS at some point without this fix.&lt;/p&gt;</comment>
                            <comment id="55209" author="antoine" created="Mon, 19 Sep 2011 22:04:47 +0000"  >&lt;p&gt;scopes are now only cached for 100 uses.&lt;br/&gt;
Verified that mem usage stays constant.&lt;/p&gt;</comment>
                            <comment id="55202" author="auto" created="Mon, 19 Sep 2011 21:45:28 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;agirbal&apos;, u&apos;name&apos;: u&apos;agirbal&apos;, u&apos;email&apos;: u&apos;antoine@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3528&quot; title=&quot;memory footprint of JS context keeps increasing as it is used&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3528&quot;&gt;&lt;del&gt;SERVER-3528&lt;/del&gt;&lt;/a&gt;: memory footprint of JS context keeps increasing as it is used, delete every 100 use&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/02e37cb0218dc70f8d6fa27966b25f31ddc355d7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/02e37cb0218dc70f8d6fa27966b25f31ddc355d7&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="49395" author="antoine" created="Fri, 19 Aug 2011 01:10:49 +0000"  >&lt;p&gt;Another workaround is to close connections regularly from the client side.&lt;br/&gt;
Or just use a new connection for each M/R job, for example by calling a new &quot;mongo&quot; process.&lt;br/&gt;
This is obviously not ideal but ok for long batch jobs.&lt;/p&gt;</comment>
                            <comment id="46214" author="antoine" created="Wed, 3 Aug 2011 22:02:50 +0000"  >&lt;p&gt;not fixed&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 19 Sep 2011 21:45:28 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 14 weeks, 1 day 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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 14 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>antoine</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hroumf:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8923</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </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|ht0d5j:</customfieldvalue>

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