{"action":"created","issue":{"url":"https://api.github.com/repos/pat/thinking-sphinx/issues/986","repository_url":"https://api.github.com/repos/pat/thinking-sphinx","labels_url":"https://api.github.com/repos/pat/thinking-sphinx/issues/986/labels{/name}","comments_url":"https://api.github.com/repos/pat/thinking-sphinx/issues/986/comments","events_url":"https://api.github.com/repos/pat/thinking-sphinx/issues/986/events","html_url":"https://github.com/pat/thinking-sphinx/issues/986","id":158133878,"number":986,"title":"RT indices not persisted on reboot (TS 3.14)","user":{"login":"al3izz","id":8162017,"avatar_url":"https://avatars.githubusercontent.com/u/8162017?v=3","gravatar_id":"","url":"https://api.github.com/users/al3izz","html_url":"https://github.com/al3izz","followers_url":"https://api.github.com/users/al3izz/followers","following_url":"https://api.github.com/users/al3izz/following{/other_user}","gists_url":"https://api.github.com/users/al3izz/gists{/gist_id}","starred_url":"https://api.github.com/users/al3izz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/al3izz/subscriptions","organizations_url":"https://api.github.com/users/al3izz/orgs","repos_url":"https://api.github.com/users/al3izz/repos","events_url":"https://api.github.com/users/al3izz/events{/privacy}","received_events_url":"https://api.github.com/users/al3izz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-06-02T12:55:39Z","updated_at":"2016-06-06T06:44:13Z","closed_at":null,"body":"I'm running Thinking Sphinx 3.14 in production mode and using Real Time indices. I noticed that when I reboot the server, the index data is not persisted. I end up having to re-index before being able to use the rails app. So, as a solution, I decided to setup a cron job to Flush the indices every 1 minute so that the latest indices would be saved to disk. However, even this does not work, as when I reboot the server, although there are .ram .kill and such files present inside db/sphinx/production/, the rails app still complains of missing indices.\r\n\r\nIndex data is simply not persisted. How do I solve this?\r\n\r\nHere's the example error I get whenever I try to save/delete something:\r\n\r\n> FATAL -- :\r\n> ThinkingSphinx::SphinxError (no such index 'person_core'\r\n\r\nAnd it complains like so for the rest of my models."},"comment":{"url":"https://api.github.com/repos/pat/thinking-sphinx/issues/comments/223880053","html_url":"https://github.com/pat/thinking-sphinx/issues/986#issuecomment-223880053","issue_url":"https://api.github.com/repos/pat/thinking-sphinx/issues/986","id":223880053,"user":{"login":"al3izz","id":8162017,"avatar_url":"https://avatars.githubusercontent.com/u/8162017?v=3","gravatar_id":"","url":"https://api.github.com/users/al3izz","html_url":"https://github.com/al3izz","followers_url":"https://api.github.com/users/al3izz/followers","following_url":"https://api.github.com/users/al3izz/following{/other_user}","gists_url":"https://api.github.com/users/al3izz/gists{/gist_id}","starred_url":"https://api.github.com/users/al3izz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/al3izz/subscriptions","organizations_url":"https://api.github.com/users/al3izz/orgs","repos_url":"https://api.github.com/users/al3izz/repos","events_url":"https://api.github.com/users/al3izz/events{/privacy}","received_events_url":"https://api.github.com/users/al3izz/received_events","type":"User","site_admin":false},"created_at":"2016-06-06T06:44:13Z","updated_at":"2016-06-06T06:44:13Z","body":"The data is available when I do that, but once I restart, it becomes unavailable, and I now know why:\r\n\r\nits because when I restart the computer, the service sphinxsearch automatically starts. And there is no service PID associated with Thinking Sphinx, so for some reason the auto starting doesn't work together.\r\n\r\nSo I have to run `sudo service sphinxsearch stop`, and then `rake ts:start`, and then it starts working and the flushed data is used.\r\n\r\nSo, in summary, I have to:\r\n1. flush the indices every 1 minute while the app is in use\r\n2. disable autostart for the sphinxsearch service\r\n3. make a cron job to run `rake ts:start` on every restart\r\n\r\nAnd that solves the issue, thanks."}}
{"actor":{"display_login":"al3izz"}}