Lucas Renan
Lucas Renan

Reputation: 3927

Mongodb crashing all the time

I'm running a single instance mongodb, and the database is crashing all the time. Anyone knows if this problem is related with running in a single instance?

Tue Aug 9 09:02:59 [initandlisten] connection accepted from 127.0.0.1:60194 #129526 Tue Aug 9 09:17:04 [initandlisten] MongoDB starting : pid=517 port=27017 dbpath=/var/lib/mongodb 32-bit

** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data ** see http://blog.mongodb.org/post/137788967/32-bit-limitations ** with --dur, the limit is lower

Tue Aug 9 09:17:04 [initandlisten] db version v1.8.2, pdfile version 4.5 Tue Aug 9 09:17:04 [initandlisten] git version: 433bbaa14aaba6860da15bd4de8edf600f56501b Tue Aug 9 09:17:04 [initandlisten] build sys info: Linux bs-linux32.10gen.cc 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 BOOST_LIB_VERSION=1_37


old lock file: /var/lib/mongodb/mongod.lock. probably means unclean shutdown recommend removing file and running --repair see: http://dochub.mongodb.org/core/repair for more information


Tue Aug 9 09:17:05 [initandlisten] exception in initAndListen std::exception: old lock file, terminating Tue Aug 9 09:17:05 dbexit: Tue Aug 9 09:17:05 [initandlisten] shutdown: going to close listening sockets... Tue Aug 9 09:17:05 [initandlisten] shutdown: going to flush diaglog... Tue Aug 9 09:17:05 [initandlisten] shutdown: going to close sockets... Tue Aug 9 09:17:05 [initandlisten] shutdown: waiting for fs preallocator... Tue Aug 9 09:17:05 [initandlisten] shutdown: closing all files... Tue Aug 9 09:17:05 closeAllFiles() finished Tue Aug 9 09:17:05 dbexit: really exiting now

Upvotes: 6

Views: 7299

Answers (3)

Kathir
Kathir

Reputation: 97

Usually 32 bit supports data till 2GB of data if you want to store more than that then upgrade to 64 bit. If your data storage is less than 2GB in 32 bit then try ~$ mongod --repair to solve the unclean shutdown probelm.

Upvotes: 0

Kevin J. Rice
Kevin J. Rice

Reputation: 3373

Two Possible Problems:

Look at ulimit -a to see how many open files you're allowed. Each TCP connection counts as an open file. likewise the actual files open. Set this to a high number and see if the crashing stops.

Also, check the value of max processes, it should be at least 4096 or 8192 for a busy server (we've got ours at 32768). Most of these processes are tracking connections, so they are idle most of the time. But, even on an unsharded system, you can get close to those limits.

To check actual open files:

lsof -p <pidnumber>

to check actual processes:

ps axo pid,ppid,rss,vsz,nlwp,cmd | egrep mongod

then look a the nlwp column.

To fix this, do:

man limits.conf
google: limits.conf pam setup ulimit change

to change the values in /etc/security/limits.d/nnn-username.conf

Upvotes: 2

cutsoy
cutsoy

Reputation: 10251

It certainly hasn't anything to do with mongoid since that isn't even a driver, so it doesn't even connect to your db-instance.
Furthermore, I'ld recommend you to post your log-files at https://jira.mongodb.org/.
(but feel free to add some more info to your question, so we may be able to help you here =).)

Upvotes: 1

Related Questions