Bas Kuis
Bas Kuis

Reputation: 770

MongoDB crashes with signal 6

    Tue Apr  1 17:21:38.898 [initandlisten] connection accepted from 127.0.0.1:58349 #42 (5 connections now open)
Tue Apr  1 17:21:50.855 [journal] exception in dur::groupCommitLL causing immediate shutdown: boost::filesystem::current_path: Too many open files in system
Tue Apr  1 17:21:50.855 dur4
Tue Apr  1 17:21:50.855 Got signal: 6 (Abort trap: 6).

Tue Apr  1 17:21:50.858 Backtrace:
0x100447d8b 0x100001531 0x7fff9225990a 0x104e80818 0x7fff922b0f61 0x1001e462a 0x10016dc3c 0x10016d537 0x10047a8b5 0x7fff9226b772 0x7fff922581a1 
 0   mongod                              0x0000000100447d8b _ZN5mongo15printStackTraceERSo + 43
 1   mongod                              0x0000000100001531 _ZN5mongo10abruptQuitEi + 225
 2   libsystem_c.dylib                   0x00007fff9225990a _sigtramp + 26
 3   ???                                 0x0000000104e80818 0x0 + 4377282584
 4   libsystem_c.dylib                   0x00007fff922b0f61 abort + 143
 5   mongod                              0x00000001001e462a _ZN5mongo10mongoAbortEPKc + 90
 6   mongod                              0x000000010016dc3c _ZN5mongo3dur27groupCommitWithLimitedLocksEv + 1052
 7   mongod                              0x000000010016d537 _ZN5mongo3dur9durThreadEv + 583
 8   mongod                              0x000000010047a8b5 thread_proxy + 229
 9   libsystem_c.dylib                   0x00007fff9226b772 _pthread_start + 327
 10  libsystem_c.dylib                   0x00007fff922581a1 thread_start + 13

Would anyone know what is causing mongo to crash? If you need more context please comment - I'll see what else I can dig up.

Upvotes: 4

Views: 5945

Answers (1)

Giovanni Benussi
Giovanni Benussi

Reputation: 3530

Change the ulimit value works for me (previously it was 256):

ulimit -n 1000

In this case I'm setting ulimit to 1.000, but you can use whatever value that you want.

According to documentation:

ulimit refers to the per-user limitations for various resources. Therefore, if your mongod instance executes as a user that is also running multiple processes, or multiple mongod processes, you might see contention for these resources. Also, be aware that the processes value (i.e. -u) refers to the combined number of distinct processes and sub-process threads.

Upvotes: 7

Related Questions