I think you can not have two server directive in upstream, how nginx would know which one to forward request to? Will it do round robin? Not sure about that will have to check.. Can you try by removing one..by prkumar - Nginx Mailing List - English
What do yo by it does not work? You mean your handler does not get called? If I were you I will attach gdb put a breakpoint at ngx_event_timer.c::ngx_event_expire_timers and see that why at line number 149 ev->handler(ev); is not getting called.? For nginx debugging and figurng things out nothing works better than gdb trust me.by prkumar - Nginx Mailing List - English
I was going through NGINX source code to implement keepalive for nginx zeromq plugin that I have developed. I have been inspired by ngx_http_upstream_keepalive_module. Was wondering why nginx uses a kind of two linkedlist based stack implementation to implement keepalive connection pool. Why not use typical linkedlist based queue implementation. Kindly refer to ngx_http_upstream_keepalive_modulby prkumar - Nginx Mailing List - English