Jonathan, I believe riddle and ts have timeout functionality already that would solve this problem.
https://github.com/freelancing-god/thinking-sphinx/blob/master/lib/thinking_sphinx/configuration.rb#L253 https://github.com/freelancing-god/thinking-sphinx/blob/master/spec/thinking_sphinx/configuration_spec.rb#L269 https://github.com/freelancing-god/riddle/blob/master/lib/riddle/client.rb#L495 https://github.com/freelancing-god/riddle/blob/master/spec/unit/client_spec.rb#L206 I think you can put a `timeout: <seconds>` in your sphinx.yml. ~sam On Fri, Dec 9, 2011 at 3:03 AM, Jonathan del Strother < [email protected]> wrote: > Heya, > I ran into some problems yesterday where searchd froze up, leading to all > my rails instances getting permanently stuck waiting on a response from > Thinking Sphinx. > > It would be nice if it were possible to specify a sphinx timeout for this > sort of problem. I had a quick hack around with the riddle source, adding > timeout blocks around the TCPSocket initialization, and using recv_nonblock > instead of recv, which seemed to work ok & suggested it might actually be > possible. However, I'd be the first to admit I probably don't know enough > about sphinx, riddle, or even socket programming to say for sure that it's > the right approach. Has this sort of thing already been discussed? I > could probably neaten things up and publish a branch if there's any > interest in it. > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/thinking-sphinx/-/9Ho8lZU7AjYJ. > 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. > -- 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.
