If it works for you, wonderful :)

Though I'm not a fan of the sudo access… granted, it would be nice to have 
Sphinx running as its own user, though that's certainly a complication that TS 
doesn't allow for.

-- 
Pat

On 07/06/2012, at 3:22 AM, Nate Vack wrote:

> Hi all,
> 
> In our app, we're running searchd as a different user than our unicorn 
> workers. Clever boy that I am, I decided set up my sudoers file so my app 
> could sudo, password-free, to our sphinxsearch user, and patched 
> thinking_sphinx to take a run_as config option.
> 
> Then, I realized that updating our delta index after every insert was adding 
> 20-100ms to our requests. No fun. I start thinking about delayed_job or one 
> of its friends...
> 
> ...and then realize another solution to both of these problems.
> 
> 1: Create a directory for "sphinx_wrappers"
> 2: Create "indexer" in that directory. It's a bash script, with simply:
> 3: (optional for us) link searchd to the real searchd
> 
> #!/bin/bash
> sudo -u sphinxsearch /path/to/indexer $* > /dev/null 2>&1 &
> 
> Now, indexer returns instantly, and there's no more patching sudo support on 
> to thinking_sphinx!
> 
> So! My question for y'all: Is there something bad about this solution I 
> haven't thought of yet?
> 
> Thanks!
> -Nate
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/thinking-sphinx/-/eXSOPlfyk9wJ.
> 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.



-- 
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