V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
sdjl
V2EX  ›  macOS

Mac下sphinxsearch出现time out错误, 请问有哪个朋友也遇到过?

  •  
  •   sdjl · 2012-07-31 16:39:16 +08:00 · 2901 次点击
    这是一个创建于 4498 天前的主题,其中的信息可能已经有所发展或是发生改变。
    错误提示:
    lyh% ./web/cgi/tool/search.py
    Traceback (most recent call last):
    File "./web/cgi/tool/search.py", line 41, in <module>
    print search(query='', index='makeup_fine', limit=30, debug=True, filtervals=[('attribute_id', [1])] )
    File "./web/cgi/tool/search.py", line 31, in search
    res = cl.Query ( argvs['query'], argvs['index'] )
    File "/Users/sdjl/aoaola/web/cgi/tool/sphinxapi.py", line 502, in Query
    results = self.RunQueries()
    File "/Users/sdjl/aoaola/web/cgi/tool/sphinxapi.py", line 639, in RunQueries
    response = self._GetResponse(sock, VER_COMMAND_SEARCH)
    File "/Users/sdjl/aoaola/web/cgi/tool/sphinxapi.py", line 245, in _GetResponse
    (status, ver, length) = unpack('>2HL', sock.recv(8))
    socket.timeout: timed out




    环境:
    mac lion
    brew install sphinx
    python 调用官方api
    相同的配置在linux下没问题


    部分config文件:
    indexer
    {
    mem_limit = 32M
    }

    searchd
    {
    listen = 9312
    #port = 9312
    log = /opt/aoaola/sphinx/log
    query_log = /opt/aoaola/sphinx/query_log
    read_timeout = 5
    client_timeout = 300
    max_children = 30
    pid_file = /opt/aoaola/sphinx/pid_file
    max_matches = 1000
    seamless_rotate = 1
    preopen_indexes = 1
    unlink_old = 1
    mva_updates_pool = 1M
    max_packet_size = 8M
    max_filters = 256
    max_filter_values = 4096
    max_batch_queries = 32
    workers = threads # for RT to work
    }


    其中/opt/aoaola/sphinx/query_log文件没有内容
    tail -10 /opt/aoaola/sphinx/log 为:
    [Tue Jul 31 11:10:38.817 2012] [ 685] binlog: finished replaying /usr/local/var/data/binlog.001; 0.0 MB in 0.000 sec
    [Tue Jul 31 11:10:38.817 2012] [ 685] binlog: finished replaying total 2 in 0.000 sec
    [Tue Jul 31 11:10:38.817 2012] [ 685] accepting connections
    [Tue Jul 31 11:20:29.575 2012] [ 685] caught SIGTERM, shutting down
    [Tue Jul 31 11:20:32.747 2012] [ 685] shutdown complete
    [Tue Jul 31 11:20:32.748 2012] [ 684] Child process 685 has been forked
    [Tue Jul 31 11:20:32.749 2012] [ 684] Child process 685 has been finished, exit code 0. Watchdog finishes also. Good bye!
    [Tue Jul 31 11:20:37.709 2012] [ 738] Child process 739 has been forked
    [Tue Jul 31 11:20:37.709 2012] [ 739] listening on all interfaces, port=9312
    [Tue Jul 31 11:20:37.756 2012] [ 739] accepting connections


    用search测试:
    lyh% search -i makeup_fine "粉底液"
    Sphinx 2.0.4-release (r3135)
    Copyright (c) 2001-2012, Andrew Aksyonoff
    Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

    using config file '/usr/local/Cellar/sphinx/2.0.4/etc/sphinx.conf'...
    index 'makeup_fine': search error: .


    郁闷了。。。 求助。。。
    1 条回复    1970-01-01 08:00:00 +08:00
    sdjl
        1
    sdjl  
    OP
       2012-07-31 16:40:35 +08:00
    注意, 相同的配置在debian下没有问题, 新换了mac配置不起来
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2519 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 15:44 · PVG 23:44 · LAX 07:44 · JFK 10:44
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.