0

I am trying to catch the value from Redis. So that I can echo it via a variable. This is why I am using eval block. But for some reason I am getting errors.

I don't get any config errors when I reload them.

Here are the errors I get after I try to load the page (nginx error.log):

2198 2013/05/15 19:46:00 [info] 18255#0: *22 client timed out (110: Connection timed out) while reading client request line, client: [...]  server: [...]
2199 2013/05/15 19:46:00 [info] 18255#0: *23 client timed out (110: Connection timed out) while reading client request line, client: [...], server: [...]
2200 2013/05/15 19:47:40 [info] 18345#0: *28 client timed out (110: Connection timed out) while reading client request line, client: [...], server: [...]

My config:

location = /session {
            eval $session {
                    set $laravel "laravel:";
                    set $redis_key $laravel$cookie_session;
                    redis_pass [...]:6379;
                    error_page      404 502 504 = @fallback;
            }

            echo $cookie_session;
            echo ' - ';
            echo $session;
    }

    location @fallback {
            echo 'Error!';
    }

This is what I get in Google Chrome:

No data received
Unable to load the webpage because the server sent no data.
0

The problem had to do with the version I was using of the NGiNX-Eval-Module.

I downloaded the version presented in the documentation. They are a more recent version in the GitHub account.

Also I had to comment out some of the code in the ngx_http_eval_module.c file: 640:39 (just *pclcf), 631:32 (just *ecf), 675, and 675.

For more information: https://github.com/vkholodkov/nginx-eval-module/issues/10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.