tag:support.flying-sphinx.com,2011-01-05:/discussions/problems/58277-thinkingsphinx-connection-errorFlying Sphinx: Discussion 2019-07-25T07:19:10Ztag:support.flying-sphinx.com,2011-01-05:Comment/474672662019-07-24T11:43:16Z2019-07-24T11:43:17ZThinkingSphinx connection error<div><p>I check Sphinx daemon - is loading</p></div>Sergey Pozhidaevtag:support.flying-sphinx.com,2011-01-05:Comment/474672662019-07-24T12:13:19Z2019-07-24T12:13:19ZThinkingSphinx connection error<div><p>Hi Sergey,</p>
<p>I’m not sure if it’s related, but can you try updating the flying-sphinx gem to the latest release (v2.1.4), and confirm thinking-sphinx is using 4.3.2?</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/474672662019-07-24T12:18:38Z2019-07-24T12:18:38ZThinkingSphinx connection error<div><p>Hi Sergey,</p>
<p>Just looking at the gem releases, there was actually a bug fix in flying-sphinx v2.1.4 to ensure it works well with thinking-sphinx v4.2+, so I suspect that’s the problem, and upgrading the two gems to their latest releases will indeed fix the issue.</p>
<p>Do let me know if that’s not the case, though!</p>
<p>Kind regards,</p>
<p>— Pat</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/474672662019-07-25T06:36:49Z2019-07-25T06:36:49ZThinkingSphinx connection error<div><p>I have an error after gems update:<br>
ThinkingSphinx::SphinxError (no enabled local indexes to search)</p></div>Sergey Pozhidaevtag:support.flying-sphinx.com,2011-01-05:Comment/474672662019-07-25T06:38:46Z2019-07-25T06:38:46ZThinkingSphinx connection error<div><p>Hi Sergey,</p>
<p>Can you confirm the name of your app so I can investigate more thoroughly?</p>
<p>Cheers,</p>
<p>— Pat</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/474672662019-07-25T06:41:48Z2019-07-25T06:41:49ZThinkingSphinx connection error<div><p>Flying Sphinx log</p></div>Sergey Pozhidaevtag:support.flying-sphinx.com,2011-01-05:Comment/474672662019-07-25T06:45:51Z2019-07-25T06:45:52ZThinkingSphinx connection error<div><p>My app name is stark-cloud-2613-pr-37<br>
Thanks!</p></div>Sergey Pozhidaevtag:support.flying-sphinx.com,2011-01-05:Comment/474672662019-07-25T06:48:13Z2019-07-25T06:48:13ZThinkingSphinx connection error<div><p>There seems to be an odd error during the indexing… I’m not yet sure what the cause is, but I’ll keep investigating and let you know what I find.</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/474672662019-07-25T07:02:24Z2019-07-25T07:02:24ZThinkingSphinx connection error<div><p>Okay, it looks like a bug in Sphinx v3.1.1.<br>
<a href="http://sphinxsearch.com/forum/view.html?id=16081">http://sphinxsearch.com/forum/view.html?id=16081</a></p>
<p>Thinking Sphinx configures Sphinx to only request 1024 records at a time, but it does that by min/max id values. e.g. 1-1024, then 1025-2048, 2049-3072, etc. If one of those min/max windows actually returns no records, this error occurs.<br>
<a href="http://sphinxsearch.com/docs/current.html#conf-sql-range-step">http://sphinxsearch.com/docs/current.html#conf-sql-range-step</a></p>
<p>You’ve got a few options to work around this…</p>
<ul>
<li>Downgrade your Sphinx version to 2.2.11 (which <em>will</em> process your indices fine - I checked that manually).</li>
<li>Remove the ranged indexing, which means it requests all records at once (not great for performance) - this is done by adding <code>set_property :disable_range? => true</code> in your index definition.</li>
<li>Or, increase the range beyond 1024 to something significantly larger, using <code>set_property :sql_range_step => 100_000</code> or similar. Depending on how many gaps are in your primary key values, you may still hit the bug!</li>
</ul>
<p>I recommend the first option, unless you know you’re only going to be dealing with small amounts of data (and then disabling the ranged queries is okay). It's a shame this bug exists, but hopefully there's a fixed release of Sphinx at some point soon.</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/474672662019-07-25T07:18:31Z2019-07-25T07:18:32ZThinkingSphinx connection error<div><p>Great! It works. Thank you very much</p></div>Sergey Pozhidaevtag:support.flying-sphinx.com,2011-01-05:Comment/474672662019-07-25T07:19:09Z2019-07-25T07:19:09ZThinkingSphinx connection error<div><p>No worries :)</p></div>Pat Allan