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

,经过编译生成的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"
        }
})
仅有的幸福
仅有的幸福

Antworte allen(1)
巴扎黑

根据官方文档,目前调整了系统参数:
上面安装了redis
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
#

重启了数据库,插入暂时恢复正常

Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage