Search code examples
sphinx

how to run multiple instances of sphinx?


I have a search engine that i run sphinx with and now I run my vbulletin forum with sphinx. The only problem is sphinx only allows you to use one config file "sphinx.conf" and I now have 2 and must use 2. So now I have sphinx.conf and sphinx-vb.conf. How can I run a second instance of searchd so that I use the sphinx-vb.conf file? The reason I need 2 running is I have different needs for indexing and have cron jobs and what not and it will make things easier. I have looked all over google and cannot figure out how to run another instance of sphinx. I know I need to run on another port also so my port for the second will be 1 higher then the original which would be 9313. Does anyone know how to do this? Thanks.

I tried to run this sudo /usr/local/bin/searchd --config /usr/local/etc/sphinx-vb.conf

and got this error FATAL: failed to lock pid file '/usr/local/var/log/searchd.pid': Resource temporarily unavailable (searchd already running?)

but of course it is running. It is running for the search engine.


Solution

  • Chris, as you've noted in both your question and your comment - you need to use a different port for each searchd process, and a different pid file. Different log files may be a good idea too :)