suddenly getting error 'invalid client key'

Diego Mónaco's Avatar

Diego Mónaco

10 Apr, 2013 10:22 PM

Today we started to get the following error from Wooden Sphinx:

(searchd error (status: 1): invalid client key '07f8d7b9a312ed8ef:f1b1982be74fcc900')

This is very strange as it was working perfectly well and we haven't changed anything in our application for the last 9 days.

Please we need your help to fix this as soon as possible because it is affecting critical functionality in a production app.

I have attached a file with a log from the application with the aforementioned error.

  1. Support Staff 1 Posted by Pat Allan on 11 Apr, 2013 12:18 AM

    Pat Allan's Avatar

    Hi Diego

    From what I can see, the setup on the server works fine, the Sphinx daemon is running. Are you still having this issue? If so, what versions of Thinking Sphinx and Flying Sphinx are you using?

    Kind regards,


  2. 2 Posted by Diego Mónaco on 11 Apr, 2013 12:28 AM

    Diego Mónaco's Avatar

    Hi Pat thanks for your quick answer, I've just checked and its working fine now, strange thing.

    Just in case the gem versions are:

    • flying-sphinx (0.8.4)
    • thinking-sphinx (2.0.10)

    Any idea what could have been the problem?

  3. Support Staff 3 Posted by Pat Allan on 11 Apr, 2013 12:49 AM

    Pat Allan's Avatar

    It seems the daemon restarted about 45 minutes ago… (right on midnight UTC) but I'm not sure why there would have been issues before that, given you've not changed anything at all.

    If you do hit this problem again, I'd recommend running the rebuild command to get a fresh Sphinx setup - but do let me know as well, and I'll see how we can debug further.

  4. 4 Posted by Diego Mónaco on 13 Apr, 2013 11:21 AM

    Diego Mónaco's Avatar

    Hi Patt, sadly, the same problem happened again yesterday, I've run heroku run flying-sphinx restart and it fixed the issue but we cannot accept this situation to keep happening randomly.
    We still haven't touched anything in our app so I think it must be a problem with your service. Please help us find a definitive solution so this never happens again, we cannot rely in manualy restarting the daemon in a production app.

  5. Support Staff 5 Posted by Pat Allan on 13 Apr, 2013 03:06 PM

    Pat Allan's Avatar

    Hi Diego

    You're right, this certainly is not good enough.

    The problem's a little confusing in its inconsistency though… when you run `heroku config` for your app, what are the FLYING_SPHINX_* environment variables set to?

    Kind regards,


  6. 6 Posted by Diego Mónaco on 13 Apr, 2013 04:12 PM

    Diego Mónaco's Avatar

    heroku config:

    FLYING_SPHINX_API_KEY: f1b1982be74fcc900
    FLYING_SPHINX_IDENTIFIER: 07f8d7b9a312ed8ef

  7. Support Staff 7 Posted by Pat Allan on 13 Apr, 2013 04:39 PM

    Pat Allan's Avatar

    That matches what I'm expecting, what's in the cache, and the configuration file sitting on that server too (same port, same server address, same client key).

    When did the most recent error occur (in UTC time)? I'll review the daemon logs to see if there's anything out of the ordinary.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • southdoctors.log 1.33 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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