Just to clarify: it works fine when you run the rake tasks yourself on the production server? But not via Capistrano? Are you sure all the same environment variables are being set in both cases?
Also: I'd recommend shifting the pid file to within the shared path, as you don't want to have to restart Sphinx on every deploy if you don't have to. -- Pat On 11/06/2013, at 2:47 AM, [email protected] wrote: > Hello Pat, > I made good progress now, but still not quite there yet.. > > its generating the file in the correct location now.. > > I changed the file name to thinking_sphinx.yml. > here is the contents of the file > > <%= Rubber.env %>: > address: <%= rubber_instances.for_role('sphinx').first.full_name > rescue 'localhost' %> > mem_limit: <%= Rubber.env == 'production' ? '1024M' : '64M' %> > configuration_file: <%= shared_path %>/sphinx/config/<%= Rubber.env > %>.sphinx.conf > indices_location: <%= shared_path %>/sphinx/db/<%= Rubber.env %>/ > pid_file: <%= Rubber.root %>/log/searchd.<%= Rubber.env %>.pid > log: <%= Rubber.root %>/log/searchd.log > query_log: <%= Rubber.root %>/log/searchd.query.log > > that get translated in to config/thinking_sphinx.yml on the server > production: > address: medl.io > mem_limit: 1024M > configuration_file: > /mnt/medlioapi-production/shared/sphinx/config/production.sphinx.conf > indices_location: /mnt/medlioapi-production/shared/sphinx/db/production/ > pid_file: > /mnt/medlioapi-production/releases/20130610163640/log/searchd.production.pid > log: > /mnt/medlioapi-production/releases/20130610163640/log/searchd.log > query_log: > /mnt/medlioapi-production/releases/20130610163640/log/searchd.query.log > > Thru capistrano scripts (rubber), it gives me the following > ** [out :: medl.io] Generating configuration to > /mnt/medlioapi-production/shared/sphinx/config/production.sphinx.conf > ** [out :: medl.io] searchd is not currently running. > ** [out :: medl.io] Stopped searchd daemon (pid: 31670). > ** [out :: medl.io] Failed to start searchd daemon. Check > /mnt/medlioapi-production/releases/20130610163640/log/searchd.log. > ** [out :: medl.io] Failed to start searchd. Check the log files for more > information. > > but when I run the rake ts:stop and rake ts:start it works fine > > I wonder what's going on now.. > > Thanks > Ravi Ada > > On Monday, June 10, 2013 11:52:57 AM UTC-4, [email protected] wrote: > Thanks Pat, I will try that. Does it mean rubber templates may have to be > updated? > > thanks > Ravi Ada > > On Monday, June 10, 2013 8:32:38 AM UTC-4, [email protected] wrote: > #rubber/common/sphinx.yml > <% > @path = "#{Rubber.root}/config/sphinx.yml" > shared_path = "/mnt/#{rubber_env.app_name}-#{Rubber.env}/shared" > %> > <%= Rubber.env %>: > address: <%= rubber_instances.for_role('sphinx').first.full_name > rescue 'localhost' %> > mem_limit: <%= Rubber.env == 'production' ? '1024M' : '64M' %> > config_file: <%= shared_path %>/sphinx/config/<%= Rubber.env > %>.sphinx.conf > searchd_file_path: <%= shared_path %>/sphinx/db/<%= Rubber.env %>/ > pid_file: <%= Rubber.root %>/log/searchd.<%= Rubber.env %>.pid > searchd_log_file: <%= Rubber.root %>/log/searchd.log > query_log_file: <%= Rubber.root %>/log/searchd.query.log > > #/config/sphinx.yml > production: > address: medl.io > mem_limit: 1024M > config_file: > /mnt/medlioapi-production/shared/sphinx/config/production.sphinx.conf > searchd_file_path: /mnt/medlioapi-production/shared/sphinx/db/production/ > pid_file: > /mnt/medlioapi-production/releases/20130609222552/log/searchd.production.pid > searchd_log_file: > /mnt/medlioapi-production/releases/20130609222552/log/searchd.log > query_log_file: > /mnt/medlioapi-production/releases/20130609222552/log/searchd.query.log > > > rake ts:configure > Generating configuration to > /mnt/medlioapi-production/releases/20130609222552/config/production.sphinx.conf > > the question is why its generating it in releases folder instead of shared > even though I specified it to generate it in shared folder in sphinx.yml. > > Thanks > Ravi ada > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
