searchd (Sphinx) run file:
#!/bin/sh
set -e
APP_PATH=/srv/application
TARGET_USER=user
exec chpst -u $TARGET_USER /usr/bin/searchd --pidfile --nodetach --config $APP_PATH/current/config/production.sphinx.conf
tail /var/log/sphinx/current
2014-06-07_18:13:56.87885 precached 9 indexes in 0.497 sec
2014-06-07_18:13:57.13740 precached 9 indexes in 0.497 sec
2014-06-07_18:13:57.88113 precached 9 indexes in 0.497 sec
2014-06-07_18:13:57.89167 precached 9 indexes in 0.497 sec
2014-06-07_18:13:59.75555 precached 9 indexes in 0.497 sec
2014-06-07_18:13:59.81554 precached 9 indexes in 0.497 sec
2014-06-07_18:14:00.33466 precached 9 indexes in 0.497 sec
... it continues to write the same line until sv stop sphinx ...
Everything works fine, seachd starts and responds to the queries. But how to make logs to be less repetitive? When I start Sphinx manually it prints the "precached 9 indexes" just once.
I'm pretty certain your problem is that searchd forks and daemonizes, which to runit looks like it exited. So runsv will keep restarting searchd, and each time it's started it will log a message.
The solution is to tell searchd to stay in the foreground by way of the --nodetach switch.