Skip to content

Commit

Permalink
perf(http) stash local response in request pool
Browse files Browse the repository at this point in the history
This is to avoid mounting memory pressure as a longer-lived
connection gets reused across many requests.
  • Loading branch information
hishamhm authored and thibaultcha committed Aug 6, 2024
1 parent d6aaf2e commit fa4a249
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/http/ngx_http_wasm_local_response.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ ngx_http_wasm_stash_local_response(ngx_http_wasm_req_ctx_t *rctx,
b->sync = 1;
}

cl = ngx_wasm_chain_get_free_buf(r->connection->pool,
cl = ngx_wasm_chain_get_free_buf(rctx->pool,
&rctx->free_bufs, len,
buf_tag, 1);
if (cl == NULL) {
Expand Down

0 comments on commit fa4a249

Please sign in to comment.