doowonee / rust-chat-server

proof of concept chat server in rust
MIT License
4 stars 1 forks source link

redis error handling #6

Open doowonee opened 2 years ago

doowonee commented 2 years ago

retry and log as an error

doowonee commented 2 years ago

서버 실행 도중 레디스 끄면 레디스와의 커넥션 손상 감지해서 다시 계쏙 재연결 시도함

2022-08-13T08:43:33.295541Z DEBUG fred::multiplexer::commands: fred-7dep2FM28M: Reconnect task finished reconnecting or syncing with: Err(Redis Error - kind: IO, details: Os { code: 61, kind: ConnectionRefused, message: "Connection refused" })    
2022-08-13T08:43:33.295617Z  WARN fred::multiplexer::commands: fred-7dep2FM28M: Failed to reconnect with error Redis Error - kind: IO, details: Os { code: 61, kind: ConnectionRefused, message: "Connection refused" }    
2022-08-13T08:43:33.295665Z  INFO fred::multiplexer::commands: fred-7dep2FM28M: Sleeping for 1098 ms before reconnecting   

레디스 커넥션 에러 관련 대응 해야함 베스트는 레디스 하나더 만들어서 거기로 이전해서 Pubsub을 옮기게 하는것도 좋을듯 클라사이드에서 HA 구현 하는거지