tag:support.flying-sphinx.com,2011-01-05:/discussions/problems/1973-lost-connection-to-mysql-serverFlying Sphinx: Discussion 2016-08-11T01:31:06Ztag:support.flying-sphinx.com,2011-01-05:Comment/377572762015-08-25T22:58:21Z2015-08-25T22:58:21ZLost connection to MySQL server<div><p>Hi Jay</p>
<p>Can you let me know what the name of your app is? Also, have you
tried running <code>heroku run bundle exec flying-sphinx
start</code>?</p>
<p>Kind regards,</p>
<p>Pat</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/377572762015-08-25T23:00:54Z2015-08-25T23:00:54ZLost connection to MySQL server<div><p>The app is beautifulnow. Yes, that command brought it back
online. Why would it have crashed? It seems to go down pretty
regularly.</p></div>Jay Sanderstag:support.flying-sphinx.com,2011-01-05:Comment/377572762015-08-25T23:11:25Z2015-08-25T23:11:25ZLost connection to MySQL server<div><p>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?</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/377572762015-08-26T05:09:11Z2015-08-26T05:09:11ZLost connection to MySQL server<div><p>Hi Jay</p>
<p>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 <code>db:migrate</code>.</p>
<p>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.</p>
<p>It's far better to just run the <code>index</code> command
instead of a <code>rebuild</code> - this will keep your indexed
data up-to-date, and avoids stopping/starting the daemon.</p>
<p>Kind regards,</p>
<p>Pat</p></div>Pat Allan