real time index problem

50 views
Skip to first unread message

J. Garcia

unread,
Oct 15, 2014, 8:19:50 AM10/15/14
to thinkin...@googlegroups.com
I am trying to convert an index to a real time index.

My index definition is like this one:

ThinkingSphinx::Index.define :artist, :with => :real_time do
  indexes name, :sortable => true
  indexes comment
end

My config is like this:
development:
  host: 127.0.0.1
  mysql41: 9306
  utf8: true
  bin_path: /usr/bin
  mem_limit: 2047M
  searchd_binary_name: searchd
  indexer_binary_name: indexer
  enable_star: true
  min_prefix_len: 3

When I run rake ts:regenerate I get a long stacktrace, a fragment of which is below
Any help would be appreciated.

Generating configuration to /home/user/my_app/config/development.sphinx.conf
Started searchd successfully (pid: 25748).
Generating index files for artist_core
rake aborted!
ThinkingSphinx::SphinxError: no such index 'artist_core' - REPLACE INTO artist_core (id, `sphinx_internal_class_name`, `name`, `comment`, `sphinx_internal_id`, `sphinx_internal_class`, `sphinx_deleted`, `name_sort`) VALUES (12, 'Artist', 'One Artist', '', 1, 'Artist', 0, 'One Artist')
/home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/connection.rb:91:in `rescue in query'
/home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/connection.rb:94:in `query'
/home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/connection.rb:71:in `execute'
/home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/real_time/transcriber.rb:20:in `block (2 levels) in copy'
/home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/connection.rb:37:in `block in take'
/home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/innertube-1.1.0/lib/innertube.rb:138:in `take'
/home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/connection.rb:35:in `take'
/home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/real_time/transcriber.rb:19:in `block in copy'
/home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/activesupport-3.2.18/lib/active_support/notifications.rb:123:in `block in instrument'
/home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/activesupport-3.2.18/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/activesupport-3.2.18/lib/active_support/notifications.rb:123:in `instrument'
/home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/logger.rb:3:in `log'
/home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/real_time/transcriber.rb:18:in `copy'
/home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/real_time/populator.rb:16:in `block in populate'
/home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/activerecord-3.2.18/lib/active_record/relation/batches.rb:21:in `block (2 levels) in

Pat Allan

unread,
Oct 15, 2014, 2:41:03 PM10/15/14
to thinkin...@googlegroups.com
Not quite sure what’s happening here… certainly you seem to be taking the right approach.

Can you run `rake ts:stop`, and then `ps aux | grep searchd` to confirm there’s no Sphinx daemons running? Then try `rake ts:regenerate` after that and see if it behaves properly.

— 
Pat

--
You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thinking-sphi...@googlegroups.com.
To post to this group, send email to thinkin...@googlegroups.com.
Visit this group at http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.

J. Garcia

unread,
Oct 15, 2014, 2:58:57 PM10/15/14
to thinkin...@googlegroups.com
I followed your recommendation and got the same result.

--
You received this message because you are subscribed to a topic in the Google Groups "Thinking Sphinx" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/thinking-sphinx/-l68CIosNdg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to thinking-sphi...@googlegroups.com.

Pat Allan

unread,
Oct 15, 2014, 3:00:52 PM10/15/14
to thinkin...@googlegroups.com
And you’ve only got the one index defined?

J. Garcia

unread,
Oct 15, 2014, 3:17:10 PM10/15/14
to thinkin...@googlegroups.com
I have active_record indexes for other models. For this model, it is the only one I have.

J. Garcia

unread,
Oct 15, 2014, 4:33:54 PM10/15/14
to thinkin...@googlegroups.com
If I comment-out all my indices except the real_time one, I get this:

rake ts:regenerate
Stopped searchd daemon (pid: 6509).
Generating configuration to /home/user/projects/my_gemset/config/development.sphinx.conf
Failed to start searchd daemon. Check /home/user/projects/my_gemset/log/development.searchd.log.
Failed to start searchd. Check the log files for more information.

Generating index files for artist_core
rake aborted!
ThinkingSphinx::ConnectionError: Error connecting to Sphinx via the MySQL protocol. Error connecting to Sphinx via the MySQL protocol. Can't connect to MySQL server on '127.0.0.1' (111) - REPLACE INTO artist_core (id, `sphinx_internal_class_name`, `name`, `comment`, `sphinx_internal_id`, `sphinx_internal_class`, `sphinx_deleted`, `name_sort`) VALUES (2, 'Artist', 'A. Mata', '', 1, 'Artist', 0, 'A. Mata')

/home/user/.rvm/gems/ruby-2.1.2@my_gemset/gems/thinking-sphinx-3.1.1/lib/thinking_sphinx/connection.rb:91:in `rescue in query'

If I immediately comment-out the real-time index then enable back the other indices, everything works fine. All this is without touching my thinking_sphinx.yml file

Pat Allan

unread,
Nov 4, 2014, 12:48:23 AM11/4/14
to thinkin...@googlegroups.com
Sorry for the delay on this one. Life’s been crazy lately (not seeing that change in the near future either).

What’s the output if you start Sphinx manually? Sounds like something’s stopping it from booting up.

  searchd —pidfile —config config/development.sphinx.conf

— 
Pat

Jeanine

unread,
Nov 6, 2014, 2:25:57 PM11/6/14
to thinkin...@googlegroups.com
I am upgrading my active_record index to real_time index as well, and ran into the same issue.  When I upgraded from sphinx-2.1.5 to sphinx-2.2.5 the issue went away.

J. Garcia

unread,
Nov 24, 2014, 1:49:58 PM11/24/14
to thinkin...@googlegroups.com
I previously had experienced some other problems with sphinx 2.2.x so I did not try that.
Thanks for the advice.
Reply all
Reply to author
Forward
0 new messages