MySQL 中 Sphinx 结果集大于 16 MB 的问题

发布于 2024-08-31 06:40:39 字数 332 浏览 4 评论 0原文

我正在通过 MySQL 使用 sphinxse 访问大型索引文本数据集。结果集的大小约为千兆字节。但是,我注意到只要数据集大于 16MB,MySQL 就会停止查询并出现以下错误:

1430 (HY000): 在处理外部数据源上的查询时出现问题。数据源错误:错误的searchd响应长度(长度=16777523)

长度显示冒犯MySQL的结果集的长度。我已经尝试使用 Sphinx 的独立搜索程序进行相同的查询。效果很好。我已经尝试了 MySQL 和 Sphinx 中所有可能的变量,但没有任何帮助。

我正在使用 Sphinx 0.9.9 rc-2 和 MySQL 5.1.46。

谢谢

I am accessing a large indexed text dataset using sphinxse via MySQL. The size of resultset is on the order of gigabytes. However, I have noticed that MySQL stops the query with following error whenever the dataset is larger than 16MB:

1430 (HY000): There was a problem processing the query on the foreign data source. Data source error: bad searchd response length (length=16777523)

length shows the length of resultset that offended MySQL. I have tried the same query with Sphinx's standalone search program. It works fine. I have tried all possible variables in both MySQL and Sphinx, but nothing is helping.

I am using Sphinx 0.9.9 rc-2 and MySQL 5.1.46.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

东走西顾 2024-09-07 06:40:39

我终于解决了这个问题。事实证明,mysql 的 sphinx 插件 (SphinxSE) 在源代码中硬编码了结果集的 16 MB 响应限制(坏坏坏源代码)。我在文件 ha_sphinx.cc 中将 SPHINXSE_MAX_ALLOC 更改为 1*1024*1024*1024,现在一切正常。

I finally solved the problem. It turns out that the sphinx plugin for mysql (SphinxSE) hard-codes the 16 MB response limit on the resultset in the source code (bad bad bad source-code). I changed SPHINXSE_MAX_ALLOC to 1*1024*1024*1024 in file ha_sphinx.cc, and everything works fine now.

ㄟ。诗瑗 2024-09-07 06:40:39

您可能需要增加 max_allowed_pa​​cket 的默认值 16M:

来自 mysql的文档

客户端和服务器都有自己的max_allowed_pa​​cket变量,所以如果你想处理大数据包,你必须在客户端和服务器中都增加这个变量。

如果您使用的是mysql客户端程序,它的默认max_allowed_pa​​cket变量是16MB。要设置更大的值,请像这样启动 mysql:

shell> mysql --max_allowed_pa​​cket=32M

将数据包大小设置为 32MB。

you probably need to increase max_allowed_packet from its default value of 16M:

From mysql's documentation

Both the client and the server have their own max_allowed_packet variable, so if you want to handle big packets, you must increase this variable both in the client and in the server.

If you are using the mysql client program, its default max_allowed_packet variable is 16MB. To set a larger value, start mysql like this:

shell> mysql --max_allowed_packet=32M

That sets the packet size to 32MB.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文