Skip to content

Conversation

@kyprizel
Copy link

@kyprizel kyprizel commented Dec 8, 2013

Fix: If client disconnects too fast (small response body), upstream connection also closes and response will not be cached.

@agentzh
Copy link
Member

agentzh commented Dec 10, 2013

@kyprizel This could be a real issue but your patch looks wrong to me :)

I think the real issue is in ngx_memc or ngx_redis2, which both do not ignore client aborts by explicitly setting conf->upstream.ignore_client_abort = 0. Will you submit patches to these modules and add new directives memc_ignore_client_abort and redis2_ignore_client_abort? Just like ngx_proxy's proxy_ignore_client_abort directive:

http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_ignore_client_abort

Thanks!

@kyprizel
Copy link
Author

I think in some cases (fetching the cache) we do not need to continue if the client was disconnected.

@agentzh
Copy link
Member

agentzh commented Dec 10, 2013

@kyprizel Easy. Just configure two separate (internal) locations for srcache_fetch and srcache_store, respectively. Put memc_ignore_client_abort off in the former location and memc_ignore_client_abort on in the latter :)

@kyprizel
Copy link
Author

Yep :) You're right, will send request later.

@kyprizel kyprizel closed this Dec 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants