【发布时间】:2026-02-05 06:55:01
【问题描述】:
我对 sphinx 索引器和大型(超过 1gb 的数据库)有问题。似乎它的空间不足,我无法更改它正在使用的 /tmp 文件夹。谷歌搜索错误会给出很多与 mysql 相关的错误,但我已将 /etc/mysql/* 文件中的所有路径更改为 /var/tmp ,它有更多可用空间。当前的 /tmp 文件夹有 1.4 GB 的空间,这似乎还不够。那么有没有办法改变 /sphinx/bin/indexer 用于临时文件的文件夹或其他一些方法来解决这个问题? (还是有可能是mysql相关的,机器有几个mysql的socket,你我都试过改tmp重启了)
终端输出:
$ /usr/local/sphinx/bin/indexer --all
Sphinx 2.0.6-release (r3473)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file './sphinx.conf'...
indexing index 'Company'...
collected 371124 docs, 20.2 MB
collected 772228 attr values
sorted 0.8 Mvalues, 100.0% done
sorted 20.4 Mhits, 100.0% done
total 371124 docs, 20237855 bytes
total 16.348 sec, 1237872 bytes/sec, 22700.24 docs/sec
indexing index 'PhoneNumbers2'...
WARNING: Attribute count is 0: switching to none docinfo
ERROR: index 'PhoneNumbers2': Error writing file '/tmp/MYbP6cIt' (Errcode: 28).
total 4058019 docs, 83846995 bytes
total 45.524 sec, 1841793 bytes/sec, 89138.94 docs/sec
total 1885604 reads, 0.779 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 76 writes, 0.392 sec, 3223.9 kb/call avg, 5.1 msec/call avg
【问题讨论】:
-
来自 errno.h:
#define ENOSPC 28 /* No space left on device */ -
已解决..错误的原因是SQL语句有问题,这可能导致文件过大等。无论如何为数据库使用不同的SQL语句解决了这个问题。
-
只是为了清楚'错误'来自mysql。它不是狮身人面像。所以是的,这将是mysql方面的一个问题。
标签: mysql linux terminal sphinx tmp