Reputation: 31
I want to run sharelatex on my vServer (CentOS 6). I installed everything but sharelatex won't start. The mongod.log says after accepting some connections:
2015-02-12T12:04:30.971+0100 [initandlisten] pthread_create failed: errno:11 Resource temporarily unavailable
2015-02-12T12:04:30.971+0100 [initandlisten] can't create new thread, closing connection
I already increased the ulimits:
[root@vServer]# ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 256270
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 21000
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 256270
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
can anyone help me?
edit: I also checked the limits of the mongod process:
[root@vServer]# cat //proc/552/limits
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 10485760 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 62848 62848 processes
Max open files 21000 21000 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 256270 256270 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
edit2:
Here ist the output of ulimit:
[root@vServer]# ulimit -Sa
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 256270
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 21000
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 256270
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
[root@vServer]# ulimit -Ha
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 256270
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 21000
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 256270
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
but as you can see I am logged in as root. Shouldn't show cat //proc/552/limits the actual limits for the process?
Upvotes: 3
Views: 7458
Reputation: 433
I've had problems with the /proc/sys/vm/max_map_count
kernel parameter with mongodb. Basically mongodb is trying to allocate more than 65k memory maps, which is the stock kernel limit.
When had this problem, the errors were the same ones you posted involving pthread_create failing. To fix it, I just did the below as root:
echo 2048000 > /proc/sys/vm/max_map_count
Whether or not this works, I highly recommend using strace
on the mongodb pid to try to see where it's failing. I don't think the error message you see is necessarily leading you in the right direction.
Upvotes: 4