Welcome! Log In Create A New Profile

Advanced

Re: Issue using ngx.location.capture in Lua Module

agentzh
January 07, 2012 06:26AM
On Fri, Jan 6, 2012 at 7:01 PM, Legrand Jérémie
<jeremie.legrand@atos.net> wrote:
>
> When I start the nginx server and request something, the lua script does
> correctly the memcache subrequest but I get this message for the postgres
> subrequest :
>
> [error] 24631#0: *28 postgres: connection failed: could not send startup
> packet: Resource temporarily unavailable
>

Which operating system are you using? I'm guessing you're using the
epoll events on Linux with nginx stable versions, no?

If you're using epoll on Linux, then it's a known issue that nginx's
epoll module could produce stale write events in current stable branch
(which has been fixed in the latest 1.1.x devel branch). During the
meantime, you can try applying the patch here:

https://github.com/agentzh/ngx_openresty/blob/master/patches/nginx-1.0.10-epoll_check_stale_wev.patch

It should be applied cleanly to 1.0.11 as well.

The real cause of this issue is that PostgreSQL's libpq library is
*very* sensitive to stale write events while sending its startup
packets. Fixing the stale write event handling in nginx's epoll module
can work around it.

If you're not using epoll or even not on Linux, please let us know :)

Regards,
-agentzh

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Issue using ngx.location.capture in Lua Module

Legrand Jérémie 2434 January 06, 2012 06:02AM

Re: Issue using ngx.location.capture in Lua Module

agentzh 734 January 07, 2012 06:26AM

Re: Issue using ngx.location.capture in Lua Module

Piotr Sikora 637 January 09, 2012 10:00AM

RE: Issue using ngx.location.capture in Lua Module

Legrand Jérémie 803 January 10, 2012 10:24AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 177
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready