forked from whx123/JavaHome
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
### 问题一:websocket接收客户端的图片,断开问题 | ||
|
||
>当时用websocket接收客户端的图片,总是断开连接,tomcat websocket默认的接收字节消息最大是8192 bytes,由于图片有100k+,所以会断开连接。 | ||
**解决方法:** | ||
|
||
是客户端建立连接后,用session.setMaxBinaryMessageBufferSize()方法修改默认的字节大小 | ||
|
||
![](https://user-gold-cdn.xitu.io/2020/7/4/1731a4cb6e86415f?w=800&h=165&f=png&s=173978) | ||
|
||
|
||
![](https://user-gold-cdn.xitu.io/2020/7/4/1731a4cdd2291bc9?w=800&h=491&f=png&s=201414) | ||
|
||
### 问题二: Redis连接超时怎么排查 | ||
- 1.到最大连接数上限了(看Redis配置) | ||
- 2.项目中连接的从来没释放过(Redis满载情况,看代码逻辑,是否有死循环) | ||
- 3.基本配置,开放的端口配置(看服务端是否临时关闭) | ||
- 4.服务器不稳定(ping一下或者用工具查看网络波动情况) | ||
|
||
### 问题三:多个list的交集有没有优雅的方法 | ||
用谷歌的工具包,guava交并补 |