对小表进行批量索引时,Zend Search Lucene HTTP 500 内部服务器错误
我刚刚开始使用 Zend Search Lucene,并正在 GoDaddy 共享 Linux 帐户上进行测试。一切正常 - 我可以创建和搜索 Lucene 文档。问题是,当我第一次尝试为整个表建立索引时,大约 30 秒后我收到 HTTP 500 内部服务器错误。如果我重写查询,只选择表中的 100 行进行索引,则效果很好。
我已经将 php memory_limit 设置增加到 128M。我尝试索引的表只有 3000 行,并且我正在为每行中的几列建立索引。
有什么想法吗?
I am just getting started with Zend Search Lucene and am testing on a GoDaddy shared Linux account. Everything is working - I can create and search Lucene Documents. The problem is when I try to index my whole table for the first time I get a HTTP 500 Internal Server Error after about 30 seconds. If I rewrite my query so that I only select 100 rows of my table to index, it works fine.
I have already increased my php memory_limit settings to 128M. The table I'm trying to index is only 3000 rows and I'm indexing a few columns from each row.
Any thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据我的经验,Zend_Search_Lucene 对于大型数据集效果不佳。出于这个原因,我在一个更大的项目中将搜索后端切换到 Apache Lucene。
Zend_Search_Lucene does not work very well for large data-sets in my experience. For that reason I switched the search backend to Apache Lucene in a larger project.
您是否尝试将超时设置为高于 30 秒(php.ini 中的默认值)?根据您索引的内容,3000 行也可以轻松超过内存阈值。如果您将所有内容都索引为文本字段,并且可能正在索引相关数据,那么您很容易就会耗尽该内存。
Did you try setting your timeout to something higher than 30seconds (default in php.ini)? The memory threshold can also be exceeded easily with 3000 rows depending on what you're indexing. If you're indexing everything as Text fields, and perhaps you're indexing related data, you can easily gobble that memory up.