mongodb - 64位系统,插入报错
仅有的幸福
仅有的幸福 2017-04-27 09:01:56
0
1
598

,经过编译生成的mongodb,文件超过2GB提示错误

rs0:PRIMARY> db.Data.insert({"name":"test"})
WriteResult({
        "nInserted" : 0,
        "writeError" : {
                "code" : 10085,
                "errmsg" : "insertDocument :: caused by :: 10085 can't map file memory"
        }
})
仅有的幸福
仅有的幸福

reply all(1)
巴扎黑

According to the official documentation, the system parameters are currently adjusted:
redis is installed on it
MEM 32GB,

vi /etc/sysctl.conf

vm.overcommit_memory = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1

vi /etc/profile

ulimit -f unlimited
ulimit -t unlimited
ulimit -v unlimited
ulimit -n 64000
ulimit -m unlimited
ulimit -u 64000

source /etc/profile

ulimit -a

core file size (blocks, -c) 1
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 256821
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 64000
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 1024
cpu time (seconds, -t) unlimited
max user processes (-u) 64000
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
#

Restarted the database and the insertion temporarily returned to normal

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template