Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.
share|improve this question

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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