Nothing obvious as far as I can tell. THis is waht I see in my /var/ log/syslog, looks like the rake ts:ind:delta ran just fine.
Oct 4 14:43:51 localhost ntpd[1977]: kernel time sync status change 2001 Oct 4 14:55:01 localhost CRON[13987]: (deploy) CMD (cd /var/www/myapp/ current && RAILS_ENV=production_bg /usr/bin/env rake check_for_spam) Oct 4 15:00:01 localhost CRON[13998]: (deploy) CMD (cd /var/www/myapp/ current && RAILS_ENV=production /usr/bin/env rake ts:in:delta) On Oct 4, 4:10 am, Pat Allan <[email protected]> wrote: > The delta is owned by the deploy user because the delta indexes initially get > created when a full index occurs... > > It's also not clear from whenever what user it runs the cron jobs - though > I'm pretty certain it uses the local user, so that should be fine. Do your > cron logs have any clues? > > Cheers > > -- > Pat > > On 04/10/2010, at 5:38 AM, badnaam wrote: > > > Yes, new records don't appear in search results until a complete > > reindex, which does not run that often. > > > Here is the directory structure of the share/db/sphinx/prod directory. > > > drwxr-xr-x 2 deploy www-data 4096 2010-10-02 22:00 . > > drwxr-xr-x 3 deploy www-data 4096 2010-09-29 22:13 .. > > -rwxr-xr-x 1 deploy www-data 3000 2010-10-02 22:00 post_core.spa > > -rwxr-xr-x 1 deploy www-data 14344 2010-10-02 22:00 post_core.spd > > -rwxr-xr-x 1 deploy www-data 797 2010-10-02 22:00 post_core.sph > > -rwxr-xr-x 1 deploy www-data 4201 2010-10-02 22:00 post_core.spi > > -rwxr-xr-x 1 deploy www-data 0 2010-10-02 22:00 post_core.spk > > -rwxr-xr-x 1 deploy www-data 0 2010-10-02 22:00 post_core.spl > > -rwxr-xr-x 1 deploy www-data 0 2010-10-02 22:00 post_core.spm > > -rwxr-xr-x 1 deploy www-data 17313 2010-10-02 22:00 post_core.spp > > -rwxr-xr-x 1 deploy www-data 300 2010-10-02 22:00 post_delta.spa > > -rwxr-xr-x 1 deploy www-data 501 2010-10-02 22:00 post_delta.spd > > -rwxr-xr-x 1 deploy www-data 797 2010-10-02 22:00 post_delta.sph > > -rwxr-xr-x 1 deploy www-data 502 2010-10-02 22:00 post_delta.spi > > -rwxr-xr-x 1 deploy www-data 0 2010-10-02 22:00 post_delta.spk > > -rwxr-xr-x 1 deploy www-data 0 2010-10-02 22:00 post_delta.spl > > -rwxr-xr-x 1 deploy www-data 0 2010-10-02 22:00 post_delta.spm > > -rwxr-xr-x 1 deploy www-data 409 2010-10-02 22:00 post_delta.spp > > > It seem the delta is owned by the "deploy" user. > > > Here is my crontab file, the jobs don't have a user specified, the > > file is created by whenever gem. > > > 0 22 * * * cd /var/www/appname/current && RAILS_ENV=production /usr/ > > bin/env rake ts:index > > > 0 * * * * cd /var/www/appname/current && RAILS_ENV=production /usr/bin/ > > env rake ts:in:delta > > > On Oct 2, 2:33 am, Pat Allan <[email protected]> wrote: > >> What exactly is the problem? Are edited records not appearing in the > >> search results within 60 minutes of them being changed? > > >> Also: What user is the delta index task being run as? > > >> The nginx error logs aren't going to help in this case, because delta > >> indexing doesn't happen via a web request, but by the rake task. I'd be > >> looking at your cron logs (assuming you're running that task via cron). > > >> Cheers > > >> -- > >> Pat > > >> On 02/10/2010, at 11:50 AM, badnaam wrote: > > >>> I have gone through several posts here..but can't seem to understand > >>> what might be happening in this case. > > >>> I am using the datatime gem based delta index approach. The delta > >>> index rake task runs every 60 minutes. > > >>> I am using passenger with nginx. The nginx process runs as root > > >>> in nginx.conf file I have the user directive as > > >>> user www-data www-data; > > >>> My rails app is owned by user "deploy" in the group www-data. > > >>> I don't see any obvious permission problem in nginx error logs. I have > >>> set the delta property appropriately I think. > > >>> define_index do > >>> indexes :body > >>> indexes :topic > >>> indexes :status > >>> indexes post_items.option, :as => :option > >>> indexes category.name, :as => :category_name > >>> indexes poster.city, :as => :city > >>> indexes poster.state, :as => :state > >>> indexes comments.body, :as => :comment_body > > >>> has created_at, updated_at > >>> has category_id, user_id, :status > > >>> has "RADIANS(users.lat)", :as => :lat, :type => :float > >>> has "RADIANS(users.lng)", :as => :lng, :type => :float > > >>> set_property :delta => :datetime, :threshold => 75.minutes > >>> end > > >>> And the bin_path in sphinx.yml > > >>> mem_limit: 20M > >>> enable_star: true > >>> searchd_file_path: /var/www/myapp/shared/db/sphinx/prod > >>> enable_star: true > >>> query_log_file: /var/www/myapp/shared/log/searchd.query.log > >>> config_file: /var/www/myapp/shared/config/prod_sphinx.conf > >>> searchd_log_file: /var/www/myapp/shared/log/searchd.log > >>> morphology: stem_en > >>> pid_file: /var/www/myapp/shared/pids/searchd_production.pid > >>> bin_path: '/usr/local/bin/' > > >>> Any ideas? > > >>> -- > >>> 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.
