mongodb too many open files-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

mongodb too many open files

2016-06-15 16:12:57 6589 1

问题描述:
mac osx 环境
通过tcp测试工具,创建3000个连接,就报 too many open files 具体错误:`

2016-05-11T00:59:29.772+0800 E STORAGE  [thread1] WiredTiger (23) [1462899569:771906][60793:0x70000020a000], log-server: /data/db/journal: opendir: Too many open files in system
2016-05-11T00:59:29.772+0800 E STORAGE  [thread1] WiredTiger (23) [1462899569:772155][60793:0x70000020a000], log-server: dirlist journal prefix WiredTigerPreplog: Too many open files in system
2016-05-11T00:59:29.772+0800 E STORAGE  [thread1] WiredTiger (23) [1462899569:772199][60793:0x70000020a000], log-server: log pre-alloc server error: Too many open files in system
2016-05-11T00:59:29.772+0800 E STORAGE  [thread1] WiredTiger (23) [1462899569:772239][60793:0x70000020a000], log-server: log server error: Too many open files in system
2016-05-11T00:59:33.022+0800 W FTDC     [ftdc] Uncaught exception in 'FileNotOpen: Failed to open interim file /data/db/diagnostic.data/metrics.interim.temp' in full-time diagnostic data capture subsystem. Shutting down the full-time diagnostic data capture subsystem.
2016-05-11T00:59:33.566+0800 E STORAGE  [thread2] WiredTiger (23) [1462899573:566795][60793:0x700000393000], file:WiredTiger.wt, WT_SESSION.checkpoint: WiredTiger.turtle: fopen: Too many open files in system
2016-05-11T00:59:33.568+0800 E STORAGE  [thread2] WiredTiger (23) [1462899573:568812][60793:0x700000393000], checkpoint-server: checkpoint server error: Too many open files in system
2016-05-11T00:59:33.568+0800 E STORAGE  [thread2] WiredTiger (-31804) [1462899573:568879][60793:0x700000393000], checkpoint-server: the process must exit and restart: WT_PANIC: WiredTiger library panic
2016-05-11T00:59:33.568+0800 I -        [thread2] Fatal Assertion 28558
2016-05-11T00:59:33.568+0800 I -        [thread2] 
取消 提交回答
全部回答(1)
  • 蛮大人123
    2019-07-17 19:39:36

    可以先查看一下允许多少个打开文件

    Yaoxings-MacBook-Pro:db yaoxing$ ulimit -a
    core file size          (blocks, -c) 0
    data seg size           (kbytes, -d) unlimited
    file size               (blocks, -f) unlimited
    max locked memory       (kbytes, -l) unlimited
    max memory size         (kbytes, -m) unlimited
    open files                      (-n) 256
    pipe size            (512 bytes, -p) 1
    stack size              (kbytes, -s) 8192
    cpu time               (seconds, -t) unlimited
    max user processes              (-u) 709
    virtual memory          (kbytes, -v) unlimited

    实际上一进入mongoshell就会提示你这一点

    2016-05-11T17:45:17.536+0800 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000

    WiredTiger的工作原理跟MMAPv1不太一样,一个集合一个文件,一个索引一个文件。所以你一共有多少集合,至少就会有集合数量x2个打开文件(以1集合文件+1索引文件计算)被占用。再考虑到网络连接数量,要保证足够大的open files值。open files可以通过以下命令修改:
    ulimit -n 1024

    0 0
相关问答

0

回答

大佬们,mongodb-cdc,Resume of change stream was not po

2022-08-20 17:13:33 164浏览量 回答数 0

1

回答

mongodb-cdc的stream api如何像table api那样能够在更新、删除操作的情况下

2022-08-10 17:22:38 92浏览量 回答数 1

1

回答

云函数运行的时候,出现 socket: too many open files 这个要怎么解决啊

2022-05-27 17:09:41 222浏览量 回答数 1

1

回答

【OSS】Linux系统运行日志报“too many open files”错误,如何处理?

2022-01-19 14:29:36 369浏览量 回答数 1

2

回答

flink-cdc 支持mongodb吗?#Flink

2020-08-07 16:38:58 1455浏览量 回答数 2

1

回答

kafka 的broker日志中出现Too many open files ,这个大家有谁碰到过吗

2019-05-23 09:58:15 5443浏览量 回答数 1

2

回答

Why so many getmore operations in mongodb when use mongo_fdw?

2016-09-22 10:21:48 3423浏览量 回答数 2

1

回答

mongo php-fpm 连接池问题

2016-06-29 10:07:44 2962浏览量 回答数 1

1

回答

mongo php-fpm 连接池问题

2016-02-13 16:14:21 2678浏览量 回答数 1

1

回答

nodejs爬网页的时候报错:(libuv) kqueue(): Too many open files in system

2016-02-08 19:52:17 3617浏览量 回答数 1
+关注
蛮大人123
我说我不帅他们就打我,还说我虚伪
0
文章
7733
问答
问答排行榜
最热
最新
相关电子书
更多
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载
冬季实战营第三期:MySQL数据库进阶实战
立即下载