Hit the same issue, and read http://sphinxsearch.com/forum/view.html?id=10783 and https://bugs.launchpad.net/ubuntu/+source/sphinxsearch/+bug/990395.

At first I thought it was due to the privileged user (root used instead of sphinxsearch), but it seems the following isn't run:
[ -n "$DODTIME" ] && sleep $DODTIME

as the restart happens to run in less than one second:
DODTIME=1                   # Time to wait for the server to die, in seconds
                            # If this value is set too low you might not
                            # let some servers to die gracefully and
                            # 'restart' will not work

Running the following to simulate the behaviour always works:
service sphinxsearch stop && sleep 1 && service sphinxsearch start

I can see that the code is the same for all Debian releases (from Wheezy to Sid), so it must be an external change (bash/dash?).

Second restart works because the process is effectively stopped after 1 second at most. If you run: service sphinxsearch restart; service sphinxsearch restart; service sphinxsearch restart
you'll have 3 fails (or 2 if the service wasn't working at first).

I'm trying to find out why the sleep isn't run, I'll let you know when I find it.

--
Yvan.

Reply via email to