Skip to content
This repository has been archived by the owner on May 29, 2023. It is now read-only.

dyups count 计数统计问题 #13

Closed
magicleo opened this issue Jun 10, 2014 · 2 comments
Closed

dyups count 计数统计问题 #13

magicleo opened this issue Jun 10, 2014 · 2 comments

Comments

@magicleo
Copy link

hi
ngx_http_dyups_srv_conf_t;中的count应该是统计该upstream上的剩余的请求数的吧?

在get_peer中count++,如果一个upstream存在多个server,proxy_next_upstream在遇到timeout等时会多次调用get_peer函数,导致count++多次,而count--仅发生在clean_request函数,会导致count值增减不一致。

是不是应该放到free_peer函数处?

@yzprofile
Copy link
Owner

free_peer 时做 count-- 操作到0时,如果此时请求被挂起,有可能会走到判断count为0,释放内存的逻辑。导致释放一个依然有请求依赖的upstream被释放,从而引起coredump。

不过我会修复你说的问题的。

谢谢你的反馈。 : )

@yzprofile
Copy link
Owner

f64385c

在这里修复了

谢谢 :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants