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
22 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,22 @@ | ||
### 问题一: netty内存泄漏 | ||
|
||
**Magee:有没有大佬了解这个异常的啊,使用的springcloudgateway, 底层没有改动** | ||
> ERROR io.netty.util.ResourceLeakDetector -LEAK: ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information. | ||
|
||
**Shawn:** | ||
> ByteBuf.release()之后没有通知垃圾回收 | ||
**百里半:** | ||
> - 内存泄漏了,应该是你们重写了他们的方法,在最后没有release. | ||
> - netty有自己的内存检测机制,你这个报错不速度解决,过一会服务就不可用了 | ||
> - 我遇到过,docker直接挂掉 | ||
> - 解决方法:找到你们重写的地方,把release加上,怎么加可以参考netty源码里面release怎么用的就好了 | ||
### 问题二:消息队列应用场景 | ||
**spring:** | ||
> 请教下,消息队列你们在项目中实际用在哪些场景? | ||
**张大树:** | ||
> - 削峰,减少数据库压力. | ||
> - 假设有10万个请求过来了,然后数据需要入库,但是如果同时写库会有压力,就可以自己生产,自己消费mq ,异步入库,前提是可以异步入库 |