Issue with 3rd-party memc and eval modules

Markus Jelsma markus at
Wed Feb 24 16:52:00 MSK 2010

Yes, i can provide a snippet. In the end i have decided to abandon the project 
of doing it in configuration. It is extremely hard to try and write imperative 
code in a declarative language; although we do have the if operator [1], 
working with it is more troublesome than ever before ;)

We will now try and build a module for our purpose, at least, i hope so.

Anyway, here is a snippet to reproduce a non -closing connection using eval in 
a named location called by echo_exec - it gets complicated indeed.

    location /test
      echo_exec @initialize;

    location @initialize
      eval_override_content_type 'text/plain';

      eval $id
        rewrite ^(.*)$ /id;
        proxy_pass http://data-1:8080;

This will fail and also fail with a memc_pass call. However, it will work if 
you replace the echo_exec call with the entire contents of the named location.

Even this little piece of code gave me a hard time; imagine how some 50 lines 
using various eval blocks, proxy_pass and memc_pass directives and many evil 
if operators ;)

Anyway, thanks for all the support on the way!



On Wednesday 24 February 2010 05:26:04 agentzh wrote:
>  tested a bit further and the both agentzh and Valery's module do not
> > close the connection inside an interal location called by echo_subrequ

Markus Jelsma - Technisch Architect - Buyways BV
050-8536620 / 06-50258350

More information about the nginx mailing list