Starting sphinx with foreman

Filip's Avatar

Filip

Aug 14, 2013 @ 02:33 PM

Hi,
I'm currently working on a project where we use foreman to handle processes.
While working in dev environment following line in procfile worked fine:

searchd: searchd --pidfile --config ./config/$RACK_ENV.sphinx.conf --nodetach

However it does not seem to start sphinx/flying-sphinx on heroku, so I wanted to ask what is the best practice to do this?

Best regards,
Filip

  1. Support Staff 1 Posted by Pat Allan on Aug 15, 2013 @ 12:43 AM

    Pat Allan's Avatar

    Hi Filip

    Sphinx doesn't reside on Heroku's servers, but on the Flying Sphinx servers (if they had Sphinx on the Heroku servers, perhaps I wouldn't have needed to build Flying Sphinx), so Foreman won't be able to find searchd.

    Foreman isn't the right tool for the job for managing Sphinx (on Heroku, at least, even though it may work well locally), as while you can start Sphinx and stop Sphinx using the flying-sphinx CLI tool (which could be referenced within your Procfile), there's no equivalent of nodetach, and so there's no ongoing process to monitor.

    I know it means working a little differently on Heroku compared to locally, but I'd recommend sticking to the flying-sphinx commands to stop/start/index Sphinx data through Foreman.

    I hope this is clear - let me know if you have further questions.

    Kind regards,

    Pat

Reply to this discussion

Internal reply

        No formatting (switch to Markdown)

          You can attach files up to 10MB

            If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

              Keyboard shortcuts

              Generic

              ? Show this help
              ESC Blurs the current field

              Comment Form

              r Focus the comment reply box
              ^ + ↩ Submit the comment

              You can use Command ⌘ instead of Control ^ on Mac