summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kreuter <richard@10gen.com>2011-03-17 12:30:24 -0400
committerRichard Kreuter <richard@10gen.com>2011-04-25 15:39:18 -0400
commit61374ff5acc13f1d5edeb4ff4d8d495ce823e02d (patch)
tree7a111ca0290e7e507e76186a162029ac9e09da82
parentd29d02b69473c568cecc12360102ede3a0bc41f5 (diff)
downloadmongo-61374ff5acc13f1d5edeb4ff4d8d495ce823e02d.tar.gz
Wait 300s for server shutdown in deb initscripts. SERVER-2041, maybe.
Re: SERVER-2041, I can't reproduce the behavior the user reports, but it could be a timing issue where the running mongod hasn't finished shutting down before the next mongod tries to start.
-rw-r--r--debian/init.d1
-rw-r--r--debian/mongodb.upstart2
2 files changed, 3 insertions, 0 deletions
diff --git a/debian/init.d b/debian/init.d
index 47a10a0832e..59e94ae51d6 100644
--- a/debian/init.d
+++ b/debian/init.d
@@ -127,6 +127,7 @@ start_server() {
stop_server() {
# Stop the process using the wrapper
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ --retry 300 \
--user $DAEMONUSER \
--exec $DAEMON
errcode=$?
diff --git a/debian/mongodb.upstart b/debian/mongodb.upstart
index 256c826a2fb..1fc9969fe39 100644
--- a/debian/mongodb.upstart
+++ b/debian/mongodb.upstart
@@ -2,6 +2,8 @@
limit nofile 20000 20000
+kill timeout 300 # wait 300s between SIGTERM and SIGKILL.
+
pre-start script
mkdir -p /var/lib/mongodb/
mkdir -p /var/log/mongodb/