Skip to content
Discussion options

You must be logged in to vote

Yes, it's a leak in ngx_http_ffi_client, and it's per closed upstream connection rather than per request. Every connection the client closes leaves its nginx connection pool behind and, over TLS, its OpenSSL SSL object too. I reproduced it on the official apache/apisix:3.18.0-debian and 3.19.0-debian images. Both ship ngx_http_ffi_client v0.1.3 (APISIX-Runtime 1.3.16 and 1.3.18), which is also the module's latest commit.

Every close path goes through ngx_http_ffi_client_keepalive_close_connection() (src/ngx_http_ffi_client_keepalive.c#L536-L548). That function deletes the timers and calls ngx_close_connection(c), which frees neither c->pool (created for each connection at request.c#L1161)…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@wliang368-leon
Comment options

@jmrplens
Comment options

Answer selected by wliang368-leon
@jmrplens
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants