版本2.1.4 基于客戶端之間文本聊天的demo修改的,壓力測試運(yùn)行一段時(shí)間后發(fā)現(xiàn)無法推送消息給客戶端了,看服務(wù)器log在不同時(shí)間出現(xiàn)過兩種錯(cuò)誤提示,應(yīng)該怎樣修復(fù)錯(cuò)誤?
1、2015-02-07 00:00:58 Worker:sendBufferToWorker fail. the Connections between Gateway and BusinessWorker are not ready
2、2015-02-07 20:15:59 Worker:worker:Gateway pid:49881 memory exceeds the maximum 124040>=124000
1、2015-02-07 00:00:58 Worker:sendBufferToWorker fail. the Connections between Gateway and BusinessWorker are not ready
這個(gè)是Gateway與BusinessWorker 之間沒建立起來長連接,如果是在Workerman剛啟動時(shí)報(bào)這個(gè)錯(cuò)可以忽略
2、2015-02-07 20:15:59 Worker:worker:Gateway pid:49881 memory exceeds the maximum 124040>=124000
這個(gè)是Monitor進(jìn)程發(fā)現(xiàn)Gateway進(jìn)程占用內(nèi)存超過配置中的限制
https://github.com/walkor/workerman-2.1.4/blob/master/workerman/conf/conf.d/Monitor.conf#L23
,試圖去重啟這個(gè)進(jìn)程(如果該進(jìn)程配置了no_reload=1則不會重啟)。如果你的客戶端連接很多,可以調(diào)高這個(gè)配置
導(dǎo)致無法推送的問題需要自己定位下,原因有很多,可能是服務(wù)端問題,也可能是客戶端問題,甚至是系統(tǒng)配置問題,我這沒有相關(guān)環(huán)境無法幫你。