Keepalive not working with upstream tcp server

Maxim Dounin mdounin at mdounin.ru
Wed Apr 2 14:53:08 UTC 2014


Hello!

On Wed, Apr 02, 2014 at 01:01:07AM -0700, Jayadev C wrote:

> I am trying to use nginx to proxy my requests to a custom tcp 
> backend server that I have. I am following the same model as the 
> default memcached module with in the nginx code base (1.5.10) , 
> the relevant config file attached.  Tried with most of the 
> keepalive options but I still see new connections getting 
> created to upstream server. (rather I do see the connection 
> getting closed by nginx in strace)

[...]

>                  my_pass my_backend;

Looks like you did something wrong in you module.  Note that 
memcached module explicitly sets u->keepalive when it's ok to keep 
a connection alive.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx mailing list