Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ts:rt:index should be allowed even if local daemon is not running #1245

Open
akostadinov opened this issue Apr 21, 2023 · 1 comment
Open

Comments

@akostadinov
Copy link
Contributor

akostadinov commented Apr 21, 2023

Presently trying to index on a machine where sphinx is not running results in:

sh-4.2$ bundle exec rake ts:rt:index
The Sphinx daemon is not currently running. Real-time indices can only be
populated by sending commands to a running daemon.

But in production it is normal to run sphinx in a dedicated server/container. Where there is no rails or anything else, just the config file generated by thinking-sphinx.

I have to do something like:

nohup sleep 200000 &
echo $! > log/searchd.production.pid

And afterwards the command works. This is to trick the :running check to succeed. Note that presently also SIGHUP is sent to the process and it is checked for being present afterwards which is another thing that external sphinx does not need.

I think that this check is not necessary as things will fails with clear enough error message in case there is no running sphinx. But if it is useful to some, then at least there should be an option to skip that check.

@akostadinov
Copy link
Contributor Author

I find it already has it. In configuration:

skip_running_check: true

Would be good for this to be documented. Also I found a curious issue. Running rake ts:stop with this option produces a process that sits waiting and kills any process it sees in pid file, whenever pid file is created. It made me mad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant