Flying Sphinx connection being reset

Thomas Fisher's Avatar

Thomas Fisher

24 Apr, 2012 10:21 PM


We're using Flying Sphinx in production, and are having some with slow performance/dropped connections. In general, the performance seems to be fairly erratic, as you can tell from the attached New Relic graph. Occasionally, search requests will spike, and requests to update the index automatically will raise Errno::ECONNRESET.

We've tried cutting down the number of delta indexes by being selective about what data has changed, and doing a similar strategy for ThinkingSphinx's ActiveRecord AttributeUpdates module, but it doesn't seem to have much of an effect.

If anyone has any experience in dealing with an issue like this, or could point me in the right direction, I'd greatly appreciate it! Thanks!

  1. Support Staff 1 Posted by Pat Allan on 26 Apr, 2012 11:58 AM

    Pat Allan's Avatar

    Hi Thomas

    Sorry for not getting back to you sooner. The performance is certainly not ideal, although it's worth noting that is not where your search daemon is - so, only indexing requests and Rails start-up should invoke calls to that server.

    That said, search performance may not be brilliant either, which may be related to the fact that the Sphinx index files have been stored on an EBS volume. I'm working on migrating each server so the index files are stored on the normal drive primarily, then backed up after every index onto the EBS (and thus, the performance will improve). Currently, this change is only in place on the nuremberg server. For the record, the three keas apps are on the following servers:

    keas-frontend-staging: cologne
    keas-frontend-demo: donetsk
    keas-frontend-production: nuremberg

    So, your production server is using the new setup… but if that's not working very well for you, then I'm certainly keen to investigate further. How often are records updating? Are you using deltas or just relying on the attribute updates?



  2. 2 Posted by Thomas Fisher on 27 Apr, 2012 08:17 PM

    Thomas Fisher's Avatar

    Hi Pat,

    Thanks for your response. Both deltas and attribute updates are running. I
    restricted deltas by overriding the indexed_data_changed? method (much of
    the indexed data is based on SQL snippets, so I didn't want to trigger a
    delta too often). I'm using a similar strategy for attribute updates.

    We're getting airbrake errors for connection reset, tracing back to the
    update attributes a few times a week.

    Let me know if there's anything I can do to get you more information about
    the problem.


  3. Pat Allan closed this discussion on 13 Jan, 2014 11:25 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac