<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:42:23 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-16821] Do not abort server when receiving multiple SIGUSR1 in the same second</title>
                <link>https://jira.mongodb.org/browse/SERVER-16821</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Server crashes if logRotate destination file already exists after receiving a SIGUSR1.&lt;br/&gt;
For example if SIGUSR1 is sent twice during the same second the destination file will be the same and the server will crash.&lt;/p&gt;


&lt;p&gt;Affected version:&lt;/p&gt;

&lt;p&gt;2015-01-13T13:54:10.021+0000 &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; db version v2.6.4&lt;br/&gt;
2015-01-13T13:54:10.021+0000 &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; git version: 3a830be0eb92d772aa855ebb711ac91d658ee910&lt;br/&gt;
2015-01-13T13:54:10.021+0000 &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; build info: Linux build7.nj1.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49&lt;/p&gt;


&lt;p&gt;The reported error is:&lt;/p&gt;

&lt;p&gt;015-01-13T13:54:10.766+0000 &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; warning: Rotating log file /data/log/mongodb/mongodb.log failed: FileRenameFailed Renaming file /data/log/mongodb/mongodb.log to /data/log/mongodb/mongodb.log.2015-01-13T13-54-10 failed; destination already exists&lt;br/&gt;
2015-01-13T13:54:10.766+0000 &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; Fatal Assertion 16782&lt;br/&gt;
2015-01-13T13:54:10.769+0000 &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; 0x11e6111 0x1187e49 0x116a97d 0x11e57cf 0x122aaa9 0x7fe544cbd182 0x7fe543fc238d&lt;br/&gt;
 /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x11e6111&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /usr/bin/mongod(_ZN5mongo10logContextEPKc+0x159) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x1187e49&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /usr/bin/mongod(_ZN5mongo13fassertFailedEi+0xcd) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x116a97d&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /usr/bin/mongod() &lt;span class=&quot;error&quot;&gt;&amp;#91;0x11e57cf&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /usr/bin/mongod() &lt;span class=&quot;error&quot;&gt;&amp;#91;0x122aaa9&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /lib/x86_64-linux-gnu/libpthread.so.0(+0x8182) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x7fe544cbd182&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x7fe543fc238d&amp;#93;&lt;/span&gt;&lt;br/&gt;
2015-01-13T13:54:10.769+0000 &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;***aborting after fassert() failure&lt;/p&gt;


&lt;p&gt;2015-01-13T13:54:10.772+0000 &lt;span class=&quot;error&quot;&gt;&amp;#91;signalProcessingThread&amp;#93;&lt;/span&gt; SEVERE: Got signal: 6 (Aborted).&lt;br/&gt;
Backtrace:0x11e6111 0x11e54ee 0x7fe543efe000 0x7fe543efdf89 0x7fe543f01398 0x116a9ea 0x11e57cf 0x122aaa9 0x7fe544cbd182 0x7fe543fc238d&lt;br/&gt;
 /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x11e6111&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /usr/bin/mongod() &lt;span class=&quot;error&quot;&gt;&amp;#91;0x11e54ee&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /lib/x86_64-linux-gnu/libc.so.6(+0x37000) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x7fe543efe000&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x7fe543efdf89&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /lib/x86_64-linux-gnu/libc.so.6(abort+0x148) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x7fe543f01398&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /usr/bin/mongod(_ZN5mongo13fassertFailedEi+0x13a) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x116a9ea&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /usr/bin/mongod() &lt;span class=&quot;error&quot;&gt;&amp;#91;0x11e57cf&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /usr/bin/mongod() &lt;span class=&quot;error&quot;&gt;&amp;#91;0x122aaa9&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /lib/x86_64-linux-gnu/libpthread.so.0(+0x8182) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x7fe544cbd182&amp;#93;&lt;/span&gt;&lt;br/&gt;
 /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) &lt;span class=&quot;error&quot;&gt;&amp;#91;0x7fe543fc238d&amp;#93;&lt;/span&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="178428">SERVER-16821</key>
            <summary>Do not abort server when receiving multiple SIGUSR1 in the same second</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="gabriel.russell@mongodb.com">Gabriel Russell</assignee>
                                    <reporter username="volans">Volans</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Jan 2015 14:24:50 +0000</created>
                <updated>Sun, 9 Apr 2017 21:48:31 +0000</updated>
                            <resolved>Wed, 25 Jan 2017 18:41:15 +0000</resolved>
                                    <version>2.6.4</version>
                                    <fixVersion>3.4.4</fixVersion>
                    <fixVersion>3.5.2</fixVersion>
                                    <component>Logging</component>
                                        <votes>0</votes>
                                    <watches>11</watches>
                                                                                                                <comments>
                            <comment id="1544641" author="xgen-internal-githook" created="Sun, 9 Apr 2017 21:45:28 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;gabrielrussell&apos;, u&apos;name&apos;: u&apos;Gabriel Russell&apos;, u&apos;email&apos;: u&apos;gabriel.russell@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-16821&quot; title=&quot;Do not abort server when receiving multiple SIGUSR1 in the same second&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-16821&quot;&gt;&lt;del&gt;SERVER-16821&lt;/del&gt;&lt;/a&gt; don&apos;t rotate logs more often then once per second&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 3cef6afea83b252613be458a0e0bf94ecea28f96)&lt;br/&gt;
Branch: v3.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/c7d6b5a70cef52b2b3a2a6830130376236cb4b9b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/c7d6b5a70cef52b2b3a2a6830130376236cb4b9b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1485192" author="xgen-internal-githook" created="Wed, 25 Jan 2017 18:40:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;gabrielrussell&apos;, u&apos;name&apos;: u&apos;Gabriel Russell&apos;, u&apos;email&apos;: u&apos;gabriel.russell@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-16821&quot; title=&quot;Do not abort server when receiving multiple SIGUSR1 in the same second&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-16821&quot;&gt;&lt;del&gt;SERVER-16821&lt;/del&gt;&lt;/a&gt; don&apos;t rotate logs more often then once per second&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3cef6afea83b252613be458a0e0bf94ecea28f96&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3cef6afea83b252613be458a0e0bf94ecea28f96&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="835978" author="volans" created="Tue, 24 Feb 2015 17:22:06 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=nicolas_&quot; class=&quot;user-hover&quot; rel=&quot;nicolas_&quot;&gt;nicolas_&lt;/a&gt; this explains why it happen to you. You&apos;re matching multiple files and logrotate apply the post-rotate block for each file if the sharedscripts option is not set (see &lt;a href=&quot;http://linuxcommand.org/man_pages/logrotate8.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://linuxcommand.org/man_pages/logrotate8.html&lt;/a&gt; ).&lt;br/&gt;
So in your case in a couple of servers was able to rotate the files in less than 1 second and send SIGUSR1 to MongoDB twice in a second, hence the assert error.&lt;/p&gt;

&lt;p&gt;If you have multiple MongoDB processes how do you send the SIGUSR1 to the right process?&lt;br/&gt;
My suggestion is to have a different logrotate per MongoDB process to be able to send the SIGUSR1 to the right process and in any case if you may match multiple files use the sharedscripts option.&lt;/p&gt;

&lt;p&gt;My 2 cents &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="835744" author="nicolas_" created="Tue, 24 Feb 2015 13:10:10 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=volans&quot; class=&quot;user-hover&quot; rel=&quot;volans&quot;&gt;volans&lt;/a&gt; I don&apos;t have the &quot;sharedscripts&quot; option. I did not notice it in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-14053?focusedCommentId=596867&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-596867&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-14053?focusedCommentId=596867&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-596867&lt;/a&gt;. Should I add it ?&lt;/p&gt;

&lt;p&gt;About rotating multiple files, the config actually matches multiple files. Only because we have several mongod running. I admit that we should create one logrotate config per mongod.&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;/var/log/mongo/*.log {&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="830006" author="volans" created="Mon, 16 Feb 2015 17:47:28 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=nicolas_&quot; class=&quot;user-hover&quot; rel=&quot;nicolas_&quot;&gt;nicolas_&lt;/a&gt; did you check if your logrotate config could match multiple files? If so, is the &quot;sharedscripts&quot; option set to run the postrotate only once?&lt;/p&gt;</comment>
                            <comment id="829993" author="nicolas_" created="Mon, 16 Feb 2015 17:07:09 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=volans&quot; class=&quot;user-hover&quot; rel=&quot;volans&quot;&gt;volans&lt;/a&gt; I checked that I don&apos;t send SIGUSR1 twice; for example I don&apos;t have a mongo log rotation configured daily and hourly. I had the exact same error message.&lt;br/&gt;
All my mongo servers are provisioned by Puppet. So they have the same logrotate configuration. Thus, I don&apos;t understand why the problem happened on 2 servers out of 6.&lt;/p&gt;</comment>
                            <comment id="827135" author="volans" created="Wed, 11 Feb 2015 20:01:21 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=nicolas_&quot; class=&quot;user-hover&quot; rel=&quot;nicolas_&quot;&gt;nicolas_&lt;/a&gt; In addition, are you getting exactly the same stack trace? &quot;failed; destination already exists&quot;&lt;/p&gt;</comment>
                            <comment id="827037" author="volans" created="Wed, 11 Feb 2015 18:34:08 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=nicolas_&quot; class=&quot;user-hover&quot; rel=&quot;nicolas_&quot;&gt;nicolas_&lt;/a&gt; have you checked if your logrotate configuration by any chance could execute the SIGUSR1 twice in the same second?&lt;br/&gt;
Because normally it should not happen for a normal daily logrotation.&lt;br/&gt;
I&apos;ll suggest you to check the matching files, the operation that you are doing, options like sharedscripts, etc.&lt;/p&gt;</comment>
                            <comment id="826584" author="nicolas_" created="Wed, 11 Feb 2015 09:50:12 +0000"  >&lt;p&gt;I updated from 2.4.9 to 2.6.7. And out of 6 mongod processes, 2 of them had this Fatal Assert on log rotation at midnight. I used SIGUSR1, and have been using it for years. I was extremely lucky that it did not crash my whole cluster. &lt;br/&gt;
As &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=volans&quot; class=&quot;user-hover&quot; rel=&quot;volans&quot;&gt;volans&lt;/a&gt; said, crashing the whole DB because of a few missing logs is way too overkill. Especially because log rotation usually happens at night. When I ran logrotate manually, the Fata Assert did not happen.&lt;/p&gt;

&lt;p&gt;To fix the problem, I also tried all suggestions, and only the one suggested by Volans worked:&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;/usr/bin/mongo&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; admin --&lt;/span&gt;&lt;span style=&quot;color: #ff1493; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;eval&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; &quot;db.runCommand( { logRotate : 1 } )&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;Anyway, I understand it will be fixed in 3.0 by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-4905&quot; title=&quot;logRotate should conform to standard log rotation mechanisms&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-4905&quot;&gt;&lt;del&gt;SERVER-4905&lt;/del&gt;&lt;/a&gt;. But this fix is so old that I don&apos;t understand why it wasn&apos;t applied to 2.6.&lt;/p&gt;</comment>
                            <comment id="803775" author="volans" created="Tue, 13 Jan 2015 21:59:21 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ramon.fernandez&quot; class=&quot;user-hover&quot; rel=&quot;ramon.fernandez&quot;&gt;ramon.fernandez&lt;/a&gt; thanks for your multiple replies.&lt;/p&gt;

&lt;p&gt;To answer to your comments:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;sure overwriting an existing file seems quite bad and I get the origin of this behaviour&lt;/li&gt;
	&lt;li&gt;I think the name could get a more granular time (i.e. microseconds) to avoid this issue and/or a random suffix to be appended to avoid collisions, but most of it it should allow a standard logrotation (i.e. just close the file descriptor and open the new one)&lt;/li&gt;
	&lt;li&gt;I&apos;m looking forward to see a more standard log rotation for MongoDB give that is quite not possible to properly integrate it with logrotate right now (yes I&apos;ve implemented my logrotate in a very similar way to the one you linked above)&lt;/li&gt;
	&lt;li&gt;I arrived to this scenario testing the logrotation configuration so yes, surely is not the case in a normal environment but I open the issue for two specific reasons:
	&lt;ul&gt;
		&lt;li&gt;crashing the whole DB seems a bit too much IMHO because will cause downtime, is not even a restart, the DB will remain down until restarted manually&lt;/li&gt;
		&lt;li&gt;I was not able to reproduce the same behaviour calling &lt;font color=&quot;blue&quot;&gt;db.runCommand( { logRotate : 1 } )&lt;/font&gt; directly from within the DB, hence I think is a bug in the way the SIGUSR1 is processed&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ol&gt;
</comment>
                            <comment id="803696" author="ramon.fernandez" created="Tue, 13 Jan 2015 20:53:10 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=volans&quot; class=&quot;user-hover&quot; rel=&quot;volans&quot;&gt;volans&lt;/a&gt;, I should add that if you&apos;re using logrotate you may want to check &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-14053?focusedCommentId=596867&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-596867&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;this comment by one of our techops engineers&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you search for how to use logrotate and MongoDB you may also run into &lt;a href=&quot;https://serverfault.com/a/653095&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this stack overflow thread&lt;/a&gt;, which was addressed by the same MongoDB engineer.&lt;/p&gt;</comment>
                            <comment id="803671" author="ramon.fernandez" created="Tue, 13 Jan 2015 20:24:30 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=volans&quot; class=&quot;user-hover&quot; rel=&quot;volans&quot;&gt;volans&lt;/a&gt;, as I mentioned before, this behavior introduced &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9358&quot; title=&quot;Log rotation can overwrite previous log files&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9358&quot;&gt;&lt;del&gt;SERVER-9358&lt;/del&gt;&lt;/a&gt; to avoid overwriting the log files. One could argue that aborting may not be the right thing to do, but not rotating the file doesn&apos;t sound correct either. Given that this may have implications to the audit subsystem, aborting was deemed preferable.&lt;/p&gt;

&lt;p&gt;One could also argue that the rotated file name could include a more granular timestamp to prevent this issue, but also that rotating a log file twice in a second is probably an error in log rotation procedures. Can you elaborate on how you arrived to this scenario to see if there&apos;s any further recommendations we can incorporate into our documentation?&lt;/p&gt;

&lt;p&gt;In &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-4905&quot; title=&quot;logRotate should conform to standard log rotation mechanisms&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-4905&quot;&gt;&lt;del&gt;SERVER-4905&lt;/del&gt;&lt;/a&gt; a new flag was introduced, logRenameOnRotate, to aid in the integration with standard log rotation mechanisms. You may want to investigate the use of this flag to see if it helps in your environment. Note that the documentation is in the pipeline, but &lt;a href=&quot;https://github.com/mongodb/mongo/commit/616461d294bd9f5054ca38b302b6fc5d70fde20c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;you can take a look at the code&lt;/a&gt;. This flag will be part of the upcoming 2.8.0 release.&lt;/p&gt;
</comment>
                            <comment id="803483" author="ramon.fernandez" created="Tue, 13 Jan 2015 17:12:59 +0000"  >&lt;p&gt;Thanks for your report &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=volans&quot; class=&quot;user-hover&quot; rel=&quot;volans&quot;&gt;volans&lt;/a&gt;. This behavior was introduced in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9358&quot; title=&quot;Log rotation can overwrite previous log files&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9358&quot;&gt;&lt;del&gt;SERVER-9358&lt;/del&gt;&lt;/a&gt; and is intended behavior. Please stay tuned for further details.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="223889">SERVER-19729</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="71953">SERVER-9358</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <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>13.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="14340"><![CDATA[v3.4]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 13 Jan 2015 17:12:59 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 44 weeks, 3 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-331</customfieldvalue>
                        </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>andrew.morrow@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 44 weeks, 3 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>gabriel.russell@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>nicolas_</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
            <customfieldvalue>volans</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrlf1r:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>156590</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1380">Platforms 2017-01-23</customfieldvalue>
    <customfieldvalue id="1518">Platforms 2017-02-13</customfieldvalue>

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

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