思维狮身人面像致命:创建binlog.001失败,错误=打开的文件太多

时间:2018-12-21 12:23:18

标签: sphinx thinking-sphinx

我正在使用Sphinx 2.2.11-id64-releasegem 'thinking-sphinx', '3.3.0'

rake ts:configure工作正常并生成了开发development.sphinx.conf

但是在运行狮身人面像rake ts:index ts:start时会失败并在日志中显示以下错误:

[Fri Dec 21 18:00:19.858 2018] [31823] WARNING: index 'section_not_today_1_with_text_89_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/89/section_not_today_1_with_text_89_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.858 2018] [31823] WARNING: index 'section_today_0_with_text_address_89_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/89/section_today_0_with_text_address_89_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.858 2018] [31823] WARNING: index 'section_not_today_0_with_text_address_89_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/89/section_not_today_0_with_text_address_89_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.859 2018] [31823] WARNING: index 'section_today_1_with_text_address_89_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/89/section_today_1_with_text_address_89_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.859 2018] [31823] WARNING: index 'section_not_today_1_with_text_address_89_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/89/section_not_today_1_with_text_address_89_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.860 2018] [31823] WARNING: index 'section_today_0_with_text_90_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/90/section_today_0_with_text_90_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.860 2018] [31823] WARNING: index 'section_not_today_0_with_text_90_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/90/section_not_today_0_with_text_90_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.860 2018] [31823] WARNING: index 'section_today_1_with_text_90_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/90/section_today_1_with_text_90_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.861 2018] [31823] WARNING: index 'section_not_today_1_with_text_90_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/90/section_not_today_1_with_text_90_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.861 2018] [31823] WARNING: index 'section_today_0_with_text_address_90_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/90/section_today_0_with_text_address_90_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.862 2018] [31823] WARNING: index 'section_not_today_0_with_text_address_90_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/90/section_not_today_0_with_text_address_90_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.862 2018] [31823] WARNING: index 'section_today_1_with_text_address_90_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/90/section_today_1_with_text_address_90_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.863 2018] [31823] WARNING: index 'section_not_today_1_with_text_address_90_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/90/section_not_today_1_with_text_address_90_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.863 2018] [31823] WARNING: index 'section_today_0_with_text_91_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/91/section_today_0_with_text_91_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.864 2018] [31823] WARNING: index 'section_not_today_0_with_text_91_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/91/section_not_today_0_with_text_91_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.864 2018] [31823] WARNING: index 'section_today_1_with_text_91_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/91/section_today_1_with_text_91_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.864 2018] [31823] WARNING: index 'section_not_today_1_with_text_91_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/91/section_not_today_1_with_text_91_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.865 2018] [31823] WARNING: index 'section_today_0_with_text_address_91_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/91/section_today_0_with_text_address_91_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.865 2018] [31823] WARNING: index 'section_not_today_0_with_text_address_91_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development0/91/section_not_today_0_with_text_address_91_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.865 2018] [31823] WARNING: index 'section_today_1_with_text_address_91_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/91/section_today_1_with_text_address_91_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.866 2018] [31823] WARNING: index 'section_not_today_1_with_text_address_91_idx_core': preload: failed to open /home/tyler/nmir/db/sphinx/development1/91/section_not_today_1_with_text_address_91_idx_core.spa: Too many open files; NOT SERVING
[Fri Dec 21 18:00:19.868 2018] [31823] FATAL: failed to create /home/tyler/nmir/tmp/binlog/development/binlog.001: errno=24, error=Too many open files
[Fri Dec 21 18:00:19.915 2018] [31822] watchdog: main process 31823 exited cleanly (exit code 1), shutting down

2 个答案:

答案 0 :(得分:1)

正如@barryhunter所指出的,这里的问题是允许您在操作系统级别打开的文件数。之所以要这么做,是因为您已经定义了大量的Sphinx索引-但应该有一些解决方法-也许可以使用ulimit,正如Barry在评论中所链接到的。

答案 1 :(得分:0)

通过在/etc/systemd/system.conf/etc/systemd/user.conf中添加以下行来解决此问题

DefaultLimitNOFILE=65000