[root@localhost haproxy]# /usr/local/haproxy/sbin/haproxy -D -f /usr/local/haproxy/haproxy.cfg
[WARNING] 351/055810 (10903) : Proxy 'stats': in multi-process mode, stats will be limited to process assigned to the current request.

只要在設定檔中加入 bind-process 1 ,讓它只跑在一顆 CPU 上 ,就不會出現錯誤訊息了。

global
	log 127.0.0.1	local0
	log 127.0.0.1	local1 notice
	#log loghost	local0 info
        ulimit-n 81200
	maxconn 32768
	#chroot /usr/share/haproxy
	pidfile /usr/local/haproxy/haproxy.pid
        uid nobody
	gid nobody
	daemon
        nbproc 2
	#debug
	#quiet

defaults
	log	global
	mode	tcp
	#option	httplog
        option  tcplog
	option	dontlognull
        #option  forwardfor
        #option  abortclose
        #option  httpclose
	retries	3
	option  redispatch
	maxconn	32768
	contimeout	5000
	clitimeout	50000
	srvtimeout	50000
        timeout check   2000
        bind-process 1

By tony

自由軟體愛好者~喜歡不斷的思考各種問題,有新的事物都會想去學習嘗試 做實驗並熱衷研究 沒有所謂頂天的技術 只有謙虛及不斷的學習 精進專業,本站主要以分享系統及網路相關知識、資源而建立。 Github http://stnet253.github.io

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料