Hi Pat,

Thanks for the reply. I've decided to upgrade my ruby to try and get
rid of the Virtual Timer Expired bug and another issue.

According to the guide on the Thinking Sphinx site:
http://freelancing-god.github.com/ts/en/deployment.html

Including:

task :before_update_code, :roles => [:app] do
  thinking_sphinx.stop
end

task :after_update_code, :roles => [:app] do
  symlink_sphinx_indexes
  thinking_sphinx.configure
  thinking_sphinx.start
end

task :symlink_sphinx_indexes, :roles => [:app] do
  run "ln -nfs #{shared_path}/db/sphinx #{current_path}/db/sphinx"
end

Will mean that Sphinx will get indexed and started on each deploy?
(Obviously I will want to reindex more often and will look into that
later)

Regards,

Colin

On Mar 4, 10:13 pm, Pat Allan <[email protected]> wrote:
> Hi Colin
>
> The output seems fine, beyond the Virtual timer line and the 0 tests line - 
> I'm guessing they're from the same source.
>
> One thing I should have been more clear about in earlier emails is that cap 
> deploy will not start or index Sphinx - you need to run tasks for that 
> yourself (much like migrations aren't part of a default deploy).
>
>   cap thinking_sphinx:index
>   cap thinking_sphinx:start
>
> And then, whenever you want to index the data, just run the index task. If 
> you've made changes to your index setup in a recent deploy, you'll want to 
> run the rebuild task, which stops Sphinx, reindexes with the new 
> configuration, and restarts.
>
> Sorry, should have explained this at the start.
>
> --
> Pat
>
> On 05/03/2010, at 4:47 AM, Colin wrote:
>
>
>
> > I broke up the script into the if statement and the rake command and
> > the if statement seems to run ok but the rake command produces:
>
> > rails/current$ rake RAILS_ENV=production thinking_sphinx:configure
> > (in /pathTo/releases/20100303200303)
> > Generating Configuration to /pathTo/releases/20100303200303/config/
> > production.sphinx.conf
> > Loaded suite /usr/local/bin/rake
> > Started
>
> > Finished in 0.000146 seconds.
>
> > 0 tests, 0 assertions, 0 failures, 0 errors
> > Virtual timer expired
>
> > So it looks like it completes fine except for that last "Virtual Timer
> > Expired" line.
> > I've googled that and it crops up in a few places but seems to be
> > related to how ruby uses threads. I'm on ruby 1.8.6 by the way.
>
> > On Mar 4, 1:40 pm, Colin <[email protected]> wrote:
> >> Hi Pat,
>
> >> I created the tmp folder and re-ran cap deploy; the output is the
> >> same.
>
> >> However if I manually run the failing script on the server I get:
>
> >> (in /pathTo/releases/20100303200303)
> >> Generating Configuration to /pathTo/releases/20100303200303/config/
> >> production.sphinx.conf
> >> Loaded suite /usr/local/bin/rake
> >> Started
> >> Finished in 0.000146 seconds.
> >> 0 tests, 0 assertions, 0 failures, 0 errors
> >> Virtual timer expired
>
> >> On Mar 4, 5:31 am, Pat Allan <[email protected]> wrote:
>
> >>> The shared folder should definitely *not* be in current - current is a 
> >>> symbolic link to the latest release, and we want a static path for Sphinx 
> >>> to point to.
>
> >>> If your tmp dir doesn't exist, try creating that - hopefully that'll do 
> >>> the job.
>
> >>> Let us know if there's still some problems.
>
> >>> --
> >>> Pat
>
> >>> On 04/03/2010, at 3:45 AM, Colin wrote:
>
> >>>> Just to add to the above;
>
> >>>> In the shared folder, the db folder exists with the sphinx folder
> >>>> inside but there is no tmp folder in the shared folder so I presume
> >>>> it's the pid path that is the problem.
>
> >>>> On Mar 3, 3:25 pm, Colin <[email protected]> wrote:
> >>>>> Hi Pat,
>
> >>>>> I ran that command and it created the folders in my rails folder. (so
> >>>>> it looks like: /pathTo/rails/shared/)
> >>>>> But my app is deployed to /pathTo/rails/current/.
> >>>>> Is that where it is supposed to create the shared folder? Or should it
> >>>>> be inside the current folder?
>
> >>>>> I updated my sphinx.yaml to reflect where the shared folder is now
> >>>>> (http://pastie.org/851754) but when I run ts:version I 
> >>>>> get:http://pastie.org/851760
>
> >>>>> So it does the command but complains about a path not being correct.
>
> >>>>> On Mar 3, 10:05 am, Pat Allan <[email protected]> wrote:
>
> >>>>>> Hi Colin
>
> >>>>>> The usual process for using capistrano for the first time is to run 
> >>>>>> these two tasks:
>
> >>>>>>   cap deploy:setup
> >>>>>>   cap deploy:cold
>
> >>>>>> Then, for further deploys just use the normal task:
>
> >>>>>>   cap deploy
>
> >>>>>> So, that shared folder won't be created at any other point if you've 
> >>>>>> not run deploy:setup. However, you don't need to start from scratch, 
> >>>>>> just run the task that line refers to instead:
>
> >>>>>>   cap thinking_sphinx:shared_sphinx_folder
>
> >>>>>> Hopefully that should help things along.
>
> >>>>>> --
> >>>>>> Pat
>
> >>>>>> On 03/03/2010, at 7:01 AM, Colin wrote:
>
> >>>>>>> Hi,
>
> >>>>>>> I've just gotten my first rails app deployed and I'm trying to get TS
> >>>>>>> working in the production environment.
> >>>>>>> I'm following two 
> >>>>>>> guides:http://www.updrift.com/article/thinkingsphinx-capistrano-tasks
> >>>>>>> andhttp://freelancing-god.github.com/ts/en/deployment.html
>
> >>>>>>> I'm using the TS gem.
> >>>>>>> My deploy.rb looks like this:http://pastie.org/850411andmy
> >>>>>>> sphinx.yaml looks like this:http://pastie.org/850413
>
> >>>>>>> At the moment when I cap deploy, no shared folder is created, which I
> >>>>>>> presume is what the last line of the deploy.rb is supposed to do. And
> >>>>>>> as a result the paths in the sphinx.yaml obviously can't be followed.
>
> >>>>>>> Can anyone suggest what is wrong, or if I've missed a step?
>
> >>>>>>> Sphinx and Thinking Sphinx are both installed on the server.
>
> >>>>>>> Regards,
>
> >>>>>>> Colin
>
> >>>>>>> --
> >>>>>>> You received this message because you are subscribed to the Google 
> >>>>>>> Groups "Thinking Sphinx" group.
> >>>>>>> To post to this group, send email to [email protected].
> >>>>>>> To unsubscribe from this group, send email to 
> >>>>>>> [email protected].
> >>>>>>> For more options, visit this group 
> >>>>>>> athttp://groups.google.com/group/thinking-sphinx?hl=en.
>
> >>>> --
> >>>> You received this message because you are subscribed to the Google 
> >>>> Groups "Thinking Sphinx" group.
> >>>> To post to this group, send email to [email protected].
> >>>> To unsubscribe from this group, send email to 
> >>>> [email protected].
> >>>> For more options, visit this group 
> >>>> athttp://groups.google.com/group/thinking-sphinx?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Thinking Sphinx" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/thinking-sphinx?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to