ThinkingSphinx not connecting to remote Sphinx server

39 views
Skip to first unread message

Cameron McKay

unread,
Jun 17, 2018, 10:55:35 PM6/17/18
to Thinking Sphinx
Hello,

I have Rails application running on the app server and I am connecting it to a remote server that contains MySQL and Sphinx using ThinkingSphinx.

I've updated my thinking_sphinx.yml file to point to the remote sphinx server.  The thinking_sphinx.yml configuration is shown in the image below:


I'm running the command "bundle exec rake ts:start" and am getting the error shown in the image below.


I'm rather lost on this.  Any help would be greatly appreciated!

Cheers, Cam.

Pat Allan

unread,
Jun 17, 2018, 10:57:44 PM6/17/18
to thinkin...@googlegroups.com
Hi Cameron,

It looks like you’re running the rake task on the app server. The server with Sphinx needs to have a copy of the Rails app, and *that* is where you run all the Sphinx-related tasks (as there’s no way to start or index Sphinx remotely).

Give that a shot, and let us know how you go!

Cheers,

— 
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 https://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.

Cameron McKay

unread,
Jun 17, 2018, 11:02:06 PM6/17/18
to Thinking Sphinx
Hey Pat,

Thanks for the quick reply!  At the moment my architecture consists of two servers:  App Server (Rails app) and Database Server (Sphinx and MySQL).

Is this a best practice architecture to use with Sphinx?  Based on your response, I am wondering if I should move Sphinx to the App Server or if I should maintain a copy of the rails app on both servers.

Cheers, Cam.

Pat Allan

unread,
Jun 17, 2018, 11:07:45 PM6/17/18
to thinkin...@googlegroups.com
Hi Cam,

Your current setup is fine (once you add a copy of the Rails app onto the database server) - especially if you’re using SQL-backed indices, because then Sphinx doesn’t have as much network overhead when it’s talking directly to the database.

If you’re using real-time indices, then it’s up to you. It might be more a matter of balancing the resources needed - I feel like the app server could be more demanding, so keeping things as you’ve got now is perhaps best? Certainly, I’d start with that and see how things go.

Cheers

— 
Pat

Cameron McKay

unread,
Jun 17, 2018, 11:11:44 PM6/17/18
to Thinking Sphinx
Perfect! Thanks for your assistance Pat :)

I'll throw the rails app on the database server and give the rake command a try!
Reply all
Reply to author
Forward
0 new messages