I’m working on my application search engine. This search engine is using sphinx for fulltext searching.
I created a cron job which is responsible for updating indexes. Currently it is set to execute once in a day.
Here what im doing in this cron.
indexer --all --rotate > sphinx.log
Sometimes the whole search module goes down and it shows this error on client application.
Notice (1024): Search query failed: connection to 127.0.0.1:9312 failed (errno=111, msg=Connection refused) [APP/models/behaviors/sphinx.php, line 134]
And on sphinx.log I found this error
FATAL: failed to lock /usr/local/sphinxsearch/delta_users/delta_users.spl: Resource temporarily unavailable, will not index. Try --rotate option.
It seems like 9312 is refused to connect, probably this is because the resource files are used by some other process. This is random behavior yet.
The environment is deployed on Linux (ubuntu) and application is created on cakephp. I’m trying to identify what cause it stops from restarting sphinx service again. I don’t know either this is sphinx configuration issue or some I/O or mysql problem. I think delta indexes causing some problem only.
Thanks in advance.