今天重啓sphinx進程時發現我只做了一次啓動,卻發現兩個進程。
查文檔得知。
Threaded server watchdog. Optional, default is 1 (watchdog enabled). Introduced in version 2.0.1-beta.
A crashed query in threads
multi-processing mode (workers = threads) can take down the entire server. With watchdog feature enabled, searchd
additionally keeps a separate lightweight process that monitors the main server process, and automatically restarts the latter in case of abnormal termination. Watchdog is enabled by default.
如果在searchd 配置中配置 workes=threads,默認會啓動watchdog。watchdog會啓動一個輕量級的進程監控searched進程,當searched進程掛掉時會自動重啓。
關閉watchdog 後
重啓sphinx
這次只啓動了一個進程。
爲了保證系統的穩定運行,不建議關閉watchdog。