版本2.1.4 基于客戶端之間文本聊天的demo修改的,壓力測(cè)試運(yùn)行一段時(shí)間后發(fā)現(xiàn)無(wú)法推送消息給客戶端了,看服務(wù)器log在不同時(shí)間出現(xiàn)過(guò)兩種錯(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 之間沒(méi)建立起來(lái)長(zhǎng)連接,如果是在Workerman剛啟動(dòng)時(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)存超過(guò)配置中的限制
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則不會(huì)重啟)。如果你的客戶端連接很多,可以調(diào)高這個(gè)配置
導(dǎo)致無(wú)法推送的問(wèn)題需要自己定位下,原因有很多,可能是服務(wù)端問(wèn)題,也可能是客戶端問(wèn)題,甚至是系統(tǒng)配置問(wèn)題,我這沒(méi)有相關(guān)環(huán)境無(wú)法幫你。