Lost connection to MySQL server

We are having issues with our search engine. Whenever anyone attempts to search, the logs contain the following error: Lost connection to MySQL server at 'reading authorization packet', system error: 0 -- I have restarted the app and attempted to index the engine, but it does not bring the service online. Search is a crucial feature, what can we do to remedy this situation? Thanks in advance for your help.

  1. Hi Jay

    Can you let me know what the name of your app is? Also, have you tried running heroku run bundle exec flying-sphinx start?

    Kind regards,

    Pat

  2. The app is beautifulnow. Yes, that command brought it back online. Why would it have crashed? It seems to go down pretty regularly.

  3. Good to know its up again, though certainly keen to stop this recurring downtime. So I can debug further, can you let me know which versions of thinking-sphinx and flying-sphinx you're using in your app?

  4. Hi Jay

    Just further to this: it looks like you've got a scheduled job running a rebuild every day - rebuilds are only required when you change the structure of your Sphinx indices (new/different fields or attributes, new/removed indices). Think of it as somewhat equivalent to db:migrate.

    Each time you run that, Sphinx is stopped while the indexing takes place, and this is perhaps where the errors have been coming from over time? Today's instance, for some reason, the daemon didn't restart, hence the longer outage.

    It's far better to just run the index command instead of a rebuild - this will keep your indexed data up-to-date, and avoids stopping/starting the daemon.

    Kind regards,

    Pat

Reply to this discussion Internal reply only staff will see it

Markdown

Attaching KB article:

» »

Read more…

Attach files

Up to 10MB each.

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

Generic

? 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

Recent Discussions