<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:56: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>[SERVER-1121] Crashes reported on OpenVZ</title>
                <link>https://jira.mongodb.org/browse/SERVER-1121</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Folks report crashes running MongoDB on OpenVZ.  See downthread here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://groups.google.com/group/mongodb-user/browse_thread/thread/82a09dd33f3d377f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://groups.google.com/group/mongodb-user/browse_thread/thread/82a09dd33f3d377f&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="11965">SERVER-1121</key>
            <summary>Crashes reported on OpenVZ</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="richard.kreuter">Richard Kreuter</assignee>
                                    <reporter username="richard.kreuter">Richard Kreuter</reporter>
                        <labels>
                    </labels>
                <created>Fri, 14 May 2010 15:30:18 +0000</created>
                <updated>Wed, 10 Dec 2014 23:15:04 +0000</updated>
                            <resolved>Mon, 23 Sep 2013 22:42:50 +0000</resolved>
                                                                                        <votes>28</votes>
                                    <watches>31</watches>
                                                                                                                <comments>
                            <comment id="430086" author="ian@10gen.com" created="Mon, 23 Sep 2013 22:42:50 +0000"  >&lt;p&gt;Resolving as &quot;Won&apos;t Fix&quot; because this is a known issue in older versions of RHEL (RHEL 5 and previous).&lt;/p&gt;</comment>
                            <comment id="122988" author="windevalley" created="Fri, 25 May 2012 04:45:37 +0000"  >&lt;p&gt;I have a try on an openVZ shared server yesterday. CentOS release 5.8 (Final) Linux xxx 2.6.18-028stab091.2 #1 SMP Fri Jun 3 00:02:40 MSD 2011 x86_64 x86_64 x86_64 GNU/Linux. The server have 7GB memory with only 10GB storage.&lt;br/&gt;
{&lt;br/&gt;
        &quot;db&quot; : &quot;test&quot;,&lt;br/&gt;
        &quot;collections&quot; : 3,&lt;br/&gt;
        &quot;objects&quot; : 5061126,&lt;br/&gt;
        &quot;avgObjSize&quot; : 671.6067136048381,&lt;br/&gt;
        &quot;dataSize&quot; : 3399086200,&lt;br/&gt;
        &quot;storageSize&quot; : 4172689408,&lt;br/&gt;
        &quot;numExtents&quot; : 32,&lt;br/&gt;
        &quot;indexes&quot; : 11,&lt;br/&gt;
        &quot;indexSize&quot; : 1688172304,&lt;br/&gt;
        &quot;fileSize&quot; : 8519680000,&lt;br/&gt;
        &quot;nsSizeMB&quot; : 16,&lt;br/&gt;
        &quot;ok&quot; : 1&lt;br/&gt;
}&lt;br/&gt;
I am doing top to monitor at the same time, during insert mongod never use more than 420MB memory. indexing does take a fair bit. it hit around 3GB when I create the last three indexes after all the insert is done. The system does reclaim memory though as I monitor it. It will reclaim more memory if I do alternate insert and indexing. like insert 10 row/index a key/insert 10 more row/index another key. &lt;br/&gt;
Unfortunately I do not have the capacity to shoot through the roof of the memory. But mongo will have no problem to run if it has enough memory.&lt;/p&gt;</comment>
                            <comment id="86374" author="dronnix" created="Wed, 8 Feb 2012 03:16:47 +0000"  >&lt;p&gt;First, make sure that the privvmpages parameter is set to unlimited or a huge value. The memory consumed by the container must be limited by physpages. As Rich says, do repeated document inserts and monitor the amount of memory allocated by MongoDB. It is going to grow until it occupies all free memory. This is normal. When it happens, the operating system will sync data to a disk and free some memory. If the solution works, /proc/user_beancounters failcount for privvmpages should be 0.&lt;br/&gt;
Don&apos;t forget, this solution works only in new OpenVZ (RHEL6 or higher).&lt;/p&gt;</comment>
                            <comment id="86137" author="thornett" created="Tue, 7 Feb 2012 17:18:18 +0000"  >&lt;p&gt;As you do repeated document inserts, the MongoDB memory footprint grows. In a healthy environment, when that footprint approaches some max threshold that a system can handle (based on total memory and other processes running), memory allocation will eventually flatline as the operating reclaims memory to keep MongoDB in check. On OpenVZ, memory is never reclaimed and the footprint grows unchecked until the machine becomes unstable. (On my server, this manifests with &quot;cannot allocate memory&quot; errors when you attempt to access or do anything on the box.)&lt;/p&gt;

&lt;p&gt;So create a few indexes, start adding a lot of data and watch your memory grow. That should give you an answer.&lt;/p&gt;</comment>
                            <comment id="86108" author="richard@10gen.com" created="Tue, 7 Feb 2012 16:26:37 +0000"  >&lt;p&gt;Not really exactly, but if you&apos;re seeing MongoDB running stably on OpenVZ for more than a few minutes with any non-zero write volume, that might suggest the problem has been resolved in recent versions of OpenVZ.&lt;/p&gt;</comment>
                            <comment id="85330" author="jcosta" created="Sat, 4 Feb 2012 19:13:31 +0000"  >&lt;p&gt;I&apos;m evaluating mongodb 2.0.2 on Centos 6.2 with OpenVZ and NFS.&lt;br/&gt;
Are there any tests that I could run to try and reproduce the problem ?&lt;/p&gt;</comment>
                            <comment id="59267" author="dronnix" created="Sat, 8 Oct 2011 08:12:00 +0000"  >&lt;p&gt;I made little investigation with this bug, and discussed it with OpenVZ developers. The reason is OpenVZ memory limitation mechanism. The problem is already fixed in OpenVZ in RHEL6 Kernel and some branches from RHEL6 kernel. In OpenVZ version earlier then RHEL6 this problem can&apos;t be fixed in generally. &lt;/p&gt;

&lt;p&gt;Solutions:&lt;br/&gt;
For OpenVZ for RHEL6 or newer: Set physpages(&lt;a href=&quot;http://wiki.openvz.org/VSwap&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://wiki.openvz.org/VSwap&lt;/a&gt;) for container where mongoDB is running to limit amount of RAM, consumed by this container. Set privvmpages(&lt;a href=&quot;http://wiki.openvz.org/UBC_secondary_parameters#privvmpages&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://wiki.openvz.org/UBC_secondary_parameters#privvmpages&lt;/a&gt;) for this container to unlimited or to huge number to allow MongoDB to map files into memory. I&apos;ve tested this solution, it works. &lt;br/&gt;
For OpenVZ earlier than RHEL6 version there is no solution. You can set privvmpages parameter to unlimited and MongoDB will work, but it means that this container will have no limits to memory, and can capture all memory in your server. Don&apos;t do it if You not sure that You realy understand consequences.&lt;/p&gt;

&lt;p&gt;Details:&lt;br/&gt;
OpenVZ with version older then RHEL6 had only one parameter for controlling the amount of memory allocated by container - privvmpages(&lt;a href=&quot;http://wiki.openvz.org/UBC_secondary_parameters#privvmpages&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://wiki.openvz.org/UBC_secondary_parameters#privvmpages&lt;/a&gt;). This parameter limits number of virtual(not physical!) memory pages, that all processes in container can allocate. As you know, mapping file into memory causes allocating virtual memory pages. So, when MongoDB tries to map into memory files with total size more than privvmpages, other process can&apos;t allocate memory.&lt;br/&gt;
In the new OpenVZ(implemented in RHEL6, and available in new Proxmox and some other products) was added new memory management model - VSwap(&lt;a href=&quot;http://wiki.openvz.org/VSwap&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://wiki.openvz.org/VSwap&lt;/a&gt;). It allows to limit amount of physical(i.e. RAM) pages. This parameter named physpages. Since it, you can set limit for virtual pages to huge number or unlimited. &lt;/p&gt;

&lt;p&gt;Links:&lt;br/&gt;
Discussion problem with OpenVZ developers: &lt;a href=&quot;http://bugzilla.openvz.org/show_bug.cgi?id=2025&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://bugzilla.openvz.org/show_bug.cgi?id=2025&lt;/a&gt;&lt;br/&gt;
OpenVZ VSwap: &lt;a href=&quot;http://wiki.openvz.org/VSwap&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://wiki.openvz.org/VSwap&lt;/a&gt;&lt;br/&gt;
OpenVZ memory limitation parameters: &lt;a href=&quot;http://wiki.openvz.org/UBC_secondary_parameters#privvmpages&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://wiki.openvz.org/UBC_secondary_parameters#privvmpages&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="34600" author="kevinlaaulau" created="Thu, 26 May 2011 17:21:37 +0000"  >&lt;p&gt;After studying many dbs, we decide to use mongoDB for our deployment but we can&apos;t continue our deployment without this fix. Any news or quick fix would be appreciated.&lt;/p&gt;

&lt;p&gt;What are the pitfalls of this quick fix?&lt;br/&gt;
&lt;a href=&quot;http://hachiari.com/blog/2011/03/31/getting-mongodb-to-work-on-openvz-without-out-of-memory-problem/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://hachiari.com/blog/2011/03/31/getting-mongodb-to-work-on-openvz-without-out-of-memory-problem/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="27600" author="jkuehn" created="Sat, 2 Apr 2011 07:13:16 +0000"  >&lt;p&gt;Could please someone post the link to the openvz bugtracker related to this issue? There should be one, but I could not find it.&lt;/p&gt;</comment>
                            <comment id="25785" author="eliot" created="Fri, 11 Mar 2011 19:44:08 +0000"  >&lt;p&gt;Durability was implemented with mmap, so has no impact on this issue.&lt;/p&gt;</comment>
                            <comment id="25781" author="thornett" created="Fri, 11 Mar 2011 18:55:43 +0000"  >&lt;p&gt;Looks like contact was made with the openvz team, so I wanted to check and see if there had been any progress on this. My site is hosted at Media Temple where all of their server offerings run on openvz (Virtuozzo). So presumably I (and the rest of their customers) are unable to run MongoDB without a fix.&lt;/p&gt;

&lt;p&gt;To follow up on Richard Kreuter&apos;s comment above:&lt;/p&gt;

&lt;p&gt;&quot;This problem may go away if mongodb stops relying on VM, probably with server-980. Moving to 1.7&quot;&lt;/p&gt;

&lt;p&gt;The issue referenced, durability:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://jira.mongodb.org/browse/SERVER-980&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;http://jira.mongodb.org/browse/SERVER-980&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;has been implemented and released in v1.7.5. However, I still see the memory allocation errors with 1.8rc-1. Having said that, would running the server with durability turned on (I have not to this point) change the memory management implementation such that this problem might go away? Or did implementing durability not require a move away from VM?&lt;/p&gt;

&lt;p&gt;Thanks, folks. Great product, I hope I can use it!&lt;/p&gt;</comment>
                            <comment id="24534" author="flappysocks" created="Wed, 23 Feb 2011 20:15:47 +0000"  >&lt;p&gt;LXC seems to be the new OpenVZ. It&apos;s part of the linux kernel, and major distros are switching to it.  &lt;a href=&quot;http://lxc.sourceforge.net&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://lxc.sourceforge.net&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Does this problem exist on LXC?&lt;/p&gt;</comment>
                            <comment id="20577" author="eliot" created="Mon, 22 Nov 2010 06:27:47 +0000"  >&lt;p&gt;Working with openvz team.&lt;/p&gt;</comment>
                            <comment id="17821" author="zedros" created="Mon, 6 Sep 2010 13:21:09 +0000"  >&lt;p&gt;as seen there &lt;a href=&quot;http://groups.google.com/group/mongodb-user/browse_thread/thread/4b756c95ded37297/ce08b362b65e79fc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://groups.google.com/group/mongodb-user/browse_thread/thread/4b756c95ded37297/ce08b362b65e79fc&lt;/a&gt; openvz allows trigger some count/iterators errors.&lt;/p&gt;

&lt;p&gt;best&lt;/p&gt;</comment>
                            <comment id="15457" author="blueboxjesse" created="Tue, 6 Jul 2010 16:07:27 +0000"  >&lt;p&gt;OpenVZ essentially throws the concept of virtual memory in the guest VM away, so your diagnosis seems accurate.   Please let us know what else we can do to assist.&lt;/p&gt;</comment>
                            <comment id="15456" author="richard@10gen.com" created="Tue, 6 Jul 2010 16:02:44 +0000"  >&lt;p&gt;By inspection, OpenVZ seems to have a hard time with how mongod leans on virtual memory.  Inserting a billion documents with integer ids eventually caused OpenVZ to run out of memory for new processes (i.e., fork() started to fail) and also for existing processes (i.e., existing shells started to die from malloc() errors).  So we think OpenVZ&apos;s virtual memory isn&apos;t up to snuff. This problem may go away if mongodb stops relying on VM, probably with server-980.  Moving to 1.7&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://jira.mongodb.org/browse/SERVER-980&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;http://jira.mongodb.org/browse/SERVER-980&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="15439" author="blueboxjesse" created="Tue, 6 Jul 2010 12:51:49 +0000"  >&lt;p&gt;Hi Richard,&lt;/p&gt;

&lt;p&gt;Just sent you an email back with access to our cloud tools.  Will continue to communicate via private email.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Jesse&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="15437" author="richard@10gen.com" created="Tue, 6 Jul 2010 12:48:48 +0000"  >&lt;p&gt;The thing that would be most helpful immediately would be access to an already running OpenVZ instance, especially one on which you&apos;ve run into troubles with MongoDB.  Please contact me at richard at 10gen dot com if you&apos;ve some instances available.  Thanks!&lt;/p&gt;</comment>
                            <comment id="15435" author="blueboxjesse" created="Tue, 6 Jul 2010 12:13:19 +0000"  >&lt;p&gt;We&apos;re a hosting provider who primarily uses OpenVZ.  We&apos;d love to see resolution to this issue and would be happy to donate server space for testing.  Please get in touch to let me know how we can be of assistance.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Jesse&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="65658">SERVER-8606</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="92842">SERVER-11050</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>19.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 6 Jul 2010 12:13:19 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 21 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_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>
                            10 years, 21 weeks, 2 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_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>dronnix</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>ian@mongodb.com</customfieldvalue>
            <customfieldvalue>blueboxjesse</customfieldvalue>
            <customfieldvalue>jcosta</customfieldvalue>
            <customfieldvalue>jkuehn</customfieldvalue>
            <customfieldvalue>kevinlaaulau</customfieldvalue>
            <customfieldvalue>richard.kreuter</customfieldvalue>
            <customfieldvalue>thornett</customfieldvalue>
            <customfieldvalue>flappysocks</customfieldvalue>
            <customfieldvalue>windevalley</customfieldvalue>
            <customfieldvalue>zedros</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpmg7:</customfieldvalue>

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

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

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