Legrand Jérémie
January 10, 2012 10:24AM
Thanks agentzh for your answer. I was exactly in the use case you described..

The patch worked perfectly for me. I hope it will be added to the next NGINX stable version.

Regards,
J. Legrand



On Fri, Jan 6, 2012 at 7:01 PM, Legrand Jérémie
<jeremie.legrand at atos.nethttp://mailman.nginx.org/mailman/listinfo/nginx-devel> 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

________________________________

Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité d'Atos ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
_______________________________________________
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 2433 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 636 January 09, 2012 10:00AM

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

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



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

Online Users

Guests: 169
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