-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dyups: https session重用的内存泄漏 // dyups: memory leak of ssl session reuse #1016
Comments
能否提供一下内存泄露的一些debug数据。邮件里agentzh已经提供了1个方法来帮助分析nginx中内存占用了。 另外我们这边,有个探测ngx中pool内存占用的工具ngx_debug_pool
如果是dyups的pool中内存占用过高,使用该工具会出现:ngx_dyups_init_upstream这个项目会一直增大。 提供如上一些信息来帮助开发者来定位会加速问题解决。 另外如果能够提供完整的reproduce方法,让开发者在自己环境中复现会更容易定位。 |
referer to yzprofile/ngx_http_dyups_module#67 |
问题解决了吗? |
分别看了一下nginx round robin和dyups处理ssl session的代码,nginx round robin内的session是属于每个peer的,意味着单个upstream ip全局只会存在一个session,而dyups是分别属于每个的request的,这里是有坑的,request的pool relese的时根本没有调用ssl_free,造成这个session结构体泄露 |
欢迎提交patch。如果属实,这将是一个有意义得修复 我简单看了下逻辑。你描述中
|
@chobits 我这也有此情况,与后端session 复用,开启会话保持,内存泄漏。nginx round robin内的session是属于每个peer的,意味着单个upstream ip全局只会存在一个session,而sticky模块针对每请求的。 |
我大致能力理解,但是需要对一下代码细节和复现方式(#1016 (comment) )。如果 直接开pr提交patch 可以加速开发者定位。 |
ngx round robin中
而dyups逻辑
产生 1. session 泄露,2. session reuse逻辑失效。 这个可能没有简单的修复方法,需要重新设计下session关联在worker cf还是dyups自己的sharedmem上。 |
I have opened a pull request(#1708) to fix this issue, you can try the patch firstly. Patch: https://patch-diff.githubusercontent.com/raw/alibaba/tengine/pull/1708.patch |
I also fixed memory leak of ssl session reuse in session sticky module in the same pr: (#1708) try patch firstly: https://patch-diff.githubusercontent.com/raw/alibaba/tengine/pull/1708.patch |
dyups组件是不是真如github上有人留言的那样,与https不兼容而导致内存泄漏。我目前就遇到跟那位反馈者类似的问题,场景也是https,困扰我半个多月了。经过持续跟踪,我发现lua的GC一直很小,怀疑泄漏点像是出在该组件上。能确认这是个BUG吗?如果是,有没有修复计划?
原反馈地址及讨论组帖子地址
yzprofile/ngx_http_dyups_module#67
https://groups.google.com/forum/#!topic/openresty/C_rnBilveJM
The text was updated successfully, but these errors were encountered: