Deltas on production with passenger not working - Tried everything.

21 views
Skip to first unread message

mrmanishs

unread,
Sep 24, 2009, 7:39:24 AM9/24/09
to Thinking Sphinx
Yesterday, for the first time, I tried getting delta working on
production with no luck.

I have passenger, and tried the two items on the thinking-sphinx site
<correct permissions and setting bin_path>, and still no luck. Also,
tried changing cache_classes=false for production and still no luck.
Anyone have any other suggestions?

It indexes fine with no errors if I do it from console.

Manish

Pat Allan

unread,
Sep 24, 2009, 12:15:17 PM9/24/09
to thinkin...@googlegroups.com
Are you seeing any output in production.log when you make a request
that should fire a delta index? What versions of Rails and TS are you
using?

--
Pat

mrmanishs

unread,
Sep 24, 2009, 1:35:53 PM9/24/09
to Thinking Sphinx
Hey Pat,

No output in the production.log.

Rails version 2.3.3.
Thinking Sphinx v1.2.11

Manish

Pat Allan

unread,
Sep 25, 2009, 4:35:32 AM9/25/09
to thinkin...@googlegroups.com
Hmm.

What is the action doing that's updating? Is it updating columns that
are used for fields, or attributes? Best approach is to change columns
used for fields, because that will always fire off the delta index (if
it's working, anyway).

Also, what delta approach are you using?

--
Pat

mrmanishs

unread,
Sep 25, 2009, 10:39:34 AM9/25/09
to Thinking Sphinx
Pat,

Just a simple save and the columns update are attributes.

I'm just using the plain assigning a delta column to the database and
then index on action. (I think that's what you're asking?)

Manish

Pat Allan

unread,
Sep 26, 2009, 6:34:41 AM9/26/09
to thinkin...@googlegroups.com
Hi Manish

Try updating a column that's used by a field instead - although going
by another thread, seems you're not the only person having this problem.

Have you tried running it in production mode on your dev machine?

--
Pat

Tim

unread,
Sep 30, 2009, 4:48:17 AM9/30/09
to Thinking Sphinx
Hi Pat,

I'm also having the same problem on my production machine. I'm using
the delta => true version with the following:

Rails 2.3.2
Thinking Sphinx v1.2.11
ruby 1.8.6 (2007-09-23 patchlevel 110)

On my development machine in production it works fine using the same
software except ruby 1.8.7. On this machine I notice the timestamps
for the delta files update when a record is updated, but on the
production machine the timestamps are not updated (except for the
creation of .spl files). The sphinx files are stored in <railsapp>/db/
sphinx/production on both machines and permissions seem to be OK.

Pat Allan

unread,
Sep 30, 2009, 8:41:58 AM9/30/09
to thinkin...@googlegroups.com
Hi Tim

What are you using as a server on your production machine? Nginx/
Passenger, Apache/Passenger, Mongrel? (This is purely to help further
debugging).

--
Pat

Pat Allan

unread,
Sep 30, 2009, 8:52:31 AM9/30/09
to thinkin...@googlegroups.com
Hi Tim

What are you using as a server on your production machine? Nginx/
Passenger, Apache/Passenger, Mongrel? (This is purely to help further
debugging).

--
Pat

On 30/09/2009, at 10:48 AM, Tim wrote:

>

Tim

unread,
Sep 30, 2009, 10:09:50 PM9/30/09
to Thinking Sphinx
Hi Pat,

It's Apache 2.0.52 and passenger 2.2.2.

Development machine in mongrel.

Tim

unread,
Sep 30, 2009, 10:16:04 PM9/30/09
to Thinking Sphinx
Sorry, it's passenger 2.0.2

Tim

unread,
Oct 1, 2009, 1:12:44 AM10/1/09
to Thinking Sphinx
FWIT, dropping into script/console on the production machine in
production ENV does trigger the delta update when changing a record.

Tim

unread,
Oct 1, 2009, 2:43:13 AM10/1/09
to Thinking Sphinx
Okey dokey. It's apache not being privy to the Sphinx installation:

/opt/ruby-1.8.6/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/callbacks.rb:180: command not found: indexer

Is there a config option to set the path to sphinx?


(Sorry to hijack the thread, this might be a different problem to what
Manish is experiencing)

Pat Allan

unread,
Oct 1, 2009, 3:02:18 AM10/1/09
to thinkin...@googlegroups.com
Yup, have a look at the last item on this page:
http://freelancing-god.github.com/ts/en/common_issues.html

No worries about hijacking the thread, Manish's problem was different
- Nginx doesn't show output in production.log, but in it's own error
log instead.

--
Pat

Tim

unread,
Oct 1, 2009, 5:09:36 AM10/1/09
to Thinking Sphinx
Beautiful. Was that there before? How embarrassment.

That works great but I have to restart apache for the change to take
effect.

Also, the error I posted before was in the apache error_log, not in
any of the rails logs. You might want to mention that on your site?

Cheers mate

Pat Allan

unread,
Oct 1, 2009, 7:26:03 AM10/1/09
to thinkin...@googlegroups.com
On 01/10/2009, at 11:09 AM, Tim wrote:

> Beautiful. Was that there before? How embarrassment.

Yeah, it's been there a little while ;)

> That works great but I have to restart apache for the change to take
> effect.
>
> Also, the error I posted before was in the apache error_log, not in
> any of the rails logs. You might want to mention that on your site?

Ah, that's definitely useful - thanks for the tip.

Cheers

--
Pat

mrmanishs

unread,
Oct 1, 2009, 8:04:42 AM10/1/09
to Thinking Sphinx
No worries... just to put closure on the thread, the issue I had was
that passenger was spawning processes as "nobody" and "nobody" did not
have access to the sphinx commands, which is a different user. The way
to fix that is set nginx.conf passenger config as following, under the
passenger_root and passenger_ruby settings:

passenger_root /usr/local/ruby-enterprise-1.8.6-20090610/lib/ruby/
gems/1.8/gems/passenger-2.2.4;
passenger_ruby /usr/local/ruby-enterprise-1.8.6-20090610/bin/ruby;
passenger_user_switching off;
passenger_default_user <your default user to spawn off rails
processes>;


Manish
Reply all
Reply to author
Forward
0 new messages