get "http upstream connect: -2" everytime connecting to memcache from access phase

Huy Phan dachuy at
Fri Mar 6 13:15:01 MSK 2009

Hi everybody, 
I'm trying to implement a nginx module that gets the value from memcached 
server in access phase. 
The module is working properly for single request, but when using Apache
Benchmark to test, I always get " Connection reset by peer" ( with 
concurrency > 2 ). 

I guess this is the issue of upstream, after checking the debug_log, I notice
that whenever the upstream connects to memcached server, it always get "http
upstream connect: -2" at the first try, then connect successful at the second 

Is it the problem of using upstream at access phase ? Can you suggest me a way
to solve this ?

More information about the nginx mailing list