Bug 1040573 - mongodb fails to start on the very first run on a slow environment
Summary: mongodb fails to start on the very first run on a slow environment
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: mongodb
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Marek Skalický
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1028690
TreeView+ depends on / blocked
 
Reported: 2013-12-11 16:07 UTC by Gabriele Cerami
Modified: 2015-05-19 10:19 UTC (History)
14 users (show)

Fixed In Version: mongodb-2.6.9-1.el7
Clone Of:
Environment:
Last Closed: 2015-05-19 10:19:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
mongod logs (8.04 KB, text/plain)
2013-12-11 16:07 UTC, Gabriele Cerami
no flags Details

Description Gabriele Cerami 2013-12-11 16:07:30 UTC
Created attachment 835342 [details]
mongod logs

Description of problem:

mongod on the very first run preallocates three journal files of size 1G+

In a busy virtualized environment it could take more than the default 90 seconds systemd allows as a timeout for service to start.
Fortunately subsequent runs continue the preallocation where the previous ones left, but it could take more than one "start" command to really start mongodb server.

Version-Release number of selected component (if applicable):
Name        : mongodb-server
Arch        : x86_64
Version     : 2.4.6
Release     : 1.fc19

How reproducible: 

bug was hit when testing in a busy low-performance virtualized environment running 6 guests
This problem should show on every system with slow disk/slow access to disk


Steps to Reproduce:
1. clean fedora install
2. yum install mongodb-server

Actual results:

Job for mongod.service failed. See 'systemctl status mongod.service' and 'journalctl -xn' for details.


Expected results:

(mongodb starts)


Additional info:

attached logs show that preallocation takes more than 90 seconds, after which deamon is killed

I don't know if is an acceptable solution for mongod to detach and signal that has started and *then* start preallocation, but a workaround could be to increase systemd start timeout by adding 

TimeoutStartSec=240

in mongod.service file

Comment 1 Christian Berendt 2014-11-26 15:53:35 UTC
Looks like this issue still exists on RHEL7. Is it possible to increase the default service timeout in the packages?

Comment 2 Fedora End Of Life 2015-01-09 20:50:14 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Marek Skalický 2015-01-12 15:57:50 UTC
It is now fixed in rawhide. In epel7 I will fix it soon...

Comment 4 Marek Skalický 2015-02-16 14:03:53 UTC
*** Bug 1191965 has been marked as a duplicate of this bug. ***

Comment 5 Fedora Update System 2015-03-26 09:18:29 UTC
mongodb-2.6.9-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/mongodb-2.6.9-1.el7

Comment 6 Fedora Update System 2015-03-28 18:39:07 UTC
Package mongodb-2.6.9-1.el7:
* should fix your issue,
* was pushed to the Fedora EPEL 7 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing mongodb-2.6.9-1.el7'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-1458/mongodb-2.6.9-1.el7
then log in and leave karma (feedback).


Note You need to log in before you can comment on or make changes to this bug.