FRiCKLE / ngx_postgres

upstream module that allows nginx to communicate directly with PostgreSQL database.
http://labs.frickle.com/nginx_ngx_postgres/
BSD 2-Clause "Simplified" License
545 stars 122 forks source link

the overflowed connections of postgres_keepalive are still alive all time #61

Open fengzhimengna opened 5 years ago

fengzhimengna commented 5 years ago

Hi, i have some trouble recently. In our project, i set the ngx_postgresql below: upstream database { postgres_server 127.0.0.1 dbname=oms user=postgres password=password; postgres_keepalive max=10 mode=single overflow=ignore; } but, when the number of connections is greater than the max value 10, the overflow connections are still alive all time, they may not disconnect automatically, why?

agentzh commented 5 years ago

@fengzhimengna It cannot be the case. This module uses the standard nginx upstream keep alive module. If that module has such bugs, the standard http proxy, http fastcgi, and etc will all fail to handle keep alive connections properly.