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.
Lost connection to MySQL server
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
#1 Posted by Pat Allan Support staff on 25 Aug, 2015 10:58 PM
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 Posted by Jay Sanders on 25 Aug, 2015 11:00 PM
The app is beautifulnow. Yes, that command brought it back online. Why would it have crashed? It seems to go down pretty regularly.
#3 Posted by Pat Allan Support staff on 25 Aug, 2015 11:11 PM
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 Posted by Pat Allan Support staff on 26 Aug, 2015 05:09 AM
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
indexcommand instead of arebuild- this will keep your indexed data up-to-date, and avoids stopping/starting the daemon.Kind regards,
Pat