thinking-sphinx: unknown column: 'sphinx_internal_class_name'

Hi Pat

We’re using thinking_sphinx for hundreds of thousands of data records and have several bulk jobs reading and writing them. In the latter case, when bulk updating records, the job often fails with:

(ThinkingSphinx::SphinxError) "unknown column: 'sphinx_internal_class_name' - REPLACE INTO my_table_name ...

The syntax looks ok, and the job works 3/4 times. The error is seemingly random. When looking into the problem, I found https://stackoverflow.com/questions/18922065/sphinx-error-no-field-sphinx-internal-class-name-found-in-schema in which you had the suspicion that it could be a bug introduced in 3.0.5. We are using the following versions:

thinking-sphinx 5.1.0
Sphinx 3.2.1

Best, Kalsan

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 25 (25 by maintainers)

Commits related to this issue

Most upvoted comments

We are hitting such issue with sphinx 2.2.11. Sphinx is running standalone in a container without any ruby stuff, just the configuration file.

In some installations all works fine in some it fails badly. Interesting is that we do indexing as background jobs. So if I trigger indexing of an object from another container, then it works. But the container doing the background jobs fails.

So it sounds plausible that something with the sphinx connection gets broken.

Is there a way to close and reestablish sphinx server connection? I don’t need it to be automatic. Initially I just want to confirm that re-establishing the connection would or would not fix the problem. And then I can probably do a rescue to trigger connection reset if this error is detected.

update: I’m gonna try ThinkingSphinx::Connection.clear

Hi Pat

Thank you very much for the commit. I switched a test system to thinking_sphinx ce2d1673329561b89737ccf9a717078ef63e94df and will let it sit there for a while, observing its behavior. Will post results here 😃

Best, Kalsan