[PATCH] Check stale write events in ngx_epoll_module

Maxim Dounin mdounin at mdounin.ru
Tue Nov 22 16:52:49 UTC 2011


Hello!

On Tue, Nov 08, 2011 at 08:40:29AM +0800, agentzh wrote:

> On Tue, Nov 8, 2011 at 1:51 AM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> >
> > Patch looks fine for me.  Could you please provide some details
> > about user-visible effects observed if the problem occurs?
> >
> 
> We've noticed this when using the ngx_postgres module to connect to a
> PostgreSQL database via libpq over a no-so-good network.
> 
> The libpq library's documentation requires a write event to occur
> before calling PQconnectPoll when PGRES_POLLING_WRITING was last
> returned. So when a stale write event triggers the PQconnectPoll call,
> libpq will simply complain about it and return an error. This is a
> limitation in libpq to do non-blocking I/O and we have to work around
> on the Nginx side.

Committed, thanks.

Maxim Dounin



More information about the nginx-devel mailing list