<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:57:30 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-1603] mongod crashes with out of memory error during restore</title>
                <link>https://jira.mongodb.org/browse/SERVER-1603</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>
&lt;p&gt;Scenario: &lt;/p&gt;

&lt;p&gt;$ /etc/init.d/mongodb stop&lt;br/&gt;
$ rm -f /var/lib/mongodb/*&lt;br/&gt;
$ /etc/init.d/mongodb start&lt;br/&gt;
$ mongorestore dump/&lt;/p&gt;

&lt;p&gt;During restore, mongod is killed with an out of memory error. The mongostat output is attached to the bug as well as the mongorestore output. &lt;/p&gt;

&lt;p&gt;Roger has account information a machine where the bug can be reproduced. &lt;/p&gt;</description>
                <environment>Linux mongodb 2.6.34.2-dotcloud-ec2 #1 SMP Tue Aug 3 12:04:10 PDT 2010 x86_64 GNU/Linux&lt;br/&gt;
</environment>
        <key id="12820">SERVER-1603</key>
            <summary>mongod crashes with out of memory error during restore</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="roger">Roger Bodamer</assignee>
                                    <reporter username="roger">Roger Bodamer</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 Aug 2010 03:15:03 +0000</created>
                <updated>Sun, 16 Jan 2011 06:09:29 +0000</updated>
                            <resolved>Sun, 16 Jan 2011 06:09:29 +0000</resolved>
                                    <version>1.6.0</version>
                    <version>1.6.1</version>
                                                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="17043" author="roger" created="Thu, 19 Aug 2010 15:30:27 +0000"  >&lt;p&gt;from Aaron:&lt;/p&gt;

&lt;p&gt;Possibly it&apos;s related to &quot;external sort&quot; which is an offline sort of keys to index.  I&apos;m just guessing because I&apos;m seeing a message about external sort shortly before the out of mem issue, and there are several lines in the external sort code where you can print mem info certain debug modes (I didn&apos;t write the code).  I&apos;m doing another run with more logging.&lt;br/&gt;
&amp;#8212;&lt;br/&gt;
I enabled the extra logging, but unfortunately it appeared in the terminal window rather than the log file.  I&apos;m attaching the terminal output.  The corresponding mongod log is in /var/log/mongodb/mongodb.log, the last run started before noon.&lt;/p&gt;

&lt;p&gt;I don&apos;t know whether or not the external sort is relevant in running out of memory, but logging enabled for the external sort does give an indication of overall memory usage increasing as the mongod continues running.&lt;/p&gt;

&lt;p&gt;Also, I modified /etc/mongodb.conf to put files in /var/lib/mongodb2 which was an empty dbpath I could use for testing.  I think /var/lib/mongodb has the original data files.&lt;/p&gt;

&lt;p&gt;I was unable to reproduce the issue running with the data files already present in /var/lib/mongodb.  I could reproduce using an empty /var/lib/mongodb2&lt;/p&gt;</comment>
                            <comment id="16994" author="roger" created="Wed, 18 Aug 2010 03:16:38 +0000"  >&lt;p&gt;Customer Comments:&lt;/p&gt;


&lt;p&gt;We are experiencing OOM crashes with mongodb 1.6.0. We can reproduce the crash&lt;br/&gt;
by repairing the database.&lt;/p&gt;

&lt;p&gt;We have tried various things:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;adding large quantity of swap (&amp;gt; 20 GB);&lt;/li&gt;
	&lt;li&gt;set /proc/sys/vm/overcommit_memory to 1 or 2 instead of the default (0);&lt;/li&gt;
	&lt;li&gt;disable oom on the the mongodb process.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;MongoDB also crashed by memory exhaustion when we tried:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;to use master/slave replication (the slave crashed);&lt;/li&gt;
	&lt;li&gt;to mongorestore from both a datadir and a dump.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Nothing we tried, except using a machine with 30GB of RAM, prevented mongodb to&lt;br/&gt;
get OOMed by the linux kernel.&lt;/p&gt;

&lt;p&gt;The crash occurs on our biggest collection in our database. This collection is&lt;br/&gt;
about 8 GB large.&lt;/p&gt;

&lt;p&gt;Please find attached the mongodb log, the mongostat output and the log of my&lt;br/&gt;
mongo shell session when reproducing the problem attached with this mail.&lt;/p&gt;

&lt;p&gt;The machine I use to reproduce the problem is a m1.large instance on Amazon&lt;br/&gt;
EC2. This machine have a dual core CPU with 7.5GB of RAM and I have added 20GB&lt;br/&gt;
of swap.&lt;/p&gt;

&lt;p&gt;The machine run Linux 2.6.34 and Ubuntu 10.04, we installed mongodb-stable from&lt;br/&gt;
the 10gen repositories.&lt;/p&gt;

&lt;p&gt;I can provide ssh root access to this machine where you will be able to debug&lt;br/&gt;
at will.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="10381" name="mongorestore.txt" size="8408" author="roger" created="Wed, 18 Aug 2010 03:15:03 +0000"/>
                            <attachment id="10380" name="mongostat.txt" size="136000" author="roger" created="Wed, 18 Aug 2010 03:15:03 +0000"/>
                            <attachment id="10384" name="term.txt" size="109697" author="roger" created="Thu, 19 Aug 2010 15:30:27 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 26 weeks, 6 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_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>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 26 weeks, 6 days ago
                        </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_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10020"><![CDATA[Linux]]></customfieldvalue>

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

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>21681</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|ht0hpj:</customfieldvalue>

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