Hi Sid
Persistant connection support exists in the 0.9.9 branch of Riddle (it
matches the PHP API). Thinking Sphinx doesn't support persistent
connections at this point in time, because I've not yet figured out an
elegant way to do so.
I've not yet got a 0.9.9rc2 version of Riddle out yet - but I've been
working on that on my machine, and there doesn't seem to be anything
related to persistent connections in the changes since rc1.
--
Pat
On 16/07/2009, at 12:50 PM, sid wrote:
>
> I'm trying to write support into riddle for 0.9.9's persistent
> connection.
>
> Does anyone know if this should work as the message to establish a
> presistent connection?
>
> socket.send([4, 0, 4, 1].pack("nnNN") + [1].pack('N'), 0)
>
> It definitely doesn't because I get a Broken Pipe error when the
> actual query runs against sphinx :(
>
>
> On Jul 16, 1:55 pm, James Healy <[email protected]> wrote:
>> sid wrote:
>>> After a lot of investigation we were advised to use persistent
>>> connections to sphinx ... because our main bottleneck is IO
>>> contention. i.e. one connection per query. Unfortunately we couldn't
>>> get riddle to start up a persistent connection. We tried caching the
>>> socket it was spawning in a class variable, but the second time
>>> Riddle
>>> tries to contact sphinx we get a "sphinx is not responding error"
>>> which I think is sphinx killing the connection on it's end.
>>
>> The PHP API for sphinx 0.9.9 (but not 0.9.8) seems to support
>> persistent
>> connections (see sections 6.8 in the docs
>> athttp://www.sphinxsearch.com/docs/current.html)
>> .
>>
>> Looking at line 1544 of api/sphinxapi.php, it looks like a flag
>> needs to
>> be set to enable this option when riddle connects to the daemon.
>>
>> I'm not particularly familiar with riddle, but the list of commands
>> on
>> line 32 of riddle/client.rb doesn't seem to include
>> SEARCHD_COMMAND_PERSIST. You might need to develop a patch to include
>> persistent connection support.
>>
>> -- James Healy <jimmy-at-deefa-dot-com> Thu, 16 Jul 2009 22:42:55
>> +1000
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---