1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

NGINX error log question

Discussion in 'Server Configuration and Hosting' started by Tracy Perry, Apr 11, 2013.

  1. Tracy Perry

    Tracy Perry Well-Known Member

    I'm just now getting this error in my error.log. It started after installing the latest sitemap add on.
    Code:
    2013/04/10 14:02:03 [warn] 14553#0: *1363 using uninitialized "xf_cache_key" variable, client: 157.56.92.161, server: twowheeldemon.com, request: "GET /robots.txt HTTP/1.1", host: "twowheeldemon.com"
    I have this set in my domains nginx vhost config file
    Code:
    set $xf_cache_key "$host$cookie_xf_session$cookie_xf_fbUid$request_method$uri$args";
            fastcgi_cache  twowheel;
            fastcgi_cache_key  $xf_cache_key;
            add_header  XF-Cache-Status $upstream_cache_status;
    and this set in config.php for XenForo
    Code:
    $config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
    Any ideas on why I keep getting the error?

    I may have figured it out - but if one of the local nginx guru's would confirm I would appreciate it.
    I had to change the vhost config file from the above example to
    Code:
     fastcgi_cache  twowheel;
            fastcgi_cache_key  $xf_cache_key;
            add_header  XF-Cache-Status $upstream_cache_status;
    set $xf_cache_key "$host$cookie_xf_session$cookie_xf_fbUid$request_method$uri$args";
    and I am no longer getting the error.
     
    Adam Howard likes this.
  2. Adam Howard

    Adam Howard Well-Known Member

    Someone sent me a PM about this thread. :p
    (So you're not alone in getting this)

    While I'm not a nginx expert .... Looking at your new configuration .... It seems fine to me.
     
  3. Tracy Perry

    Tracy Perry Well-Known Member

    :D It's been rocking along since I posted the original thread with no more problems. Thanks for checking it out.
    I got to thinking tho' (after looking at my Munin stats and seeing that at max my system would use 1.4GB Ram on a 1GB VPS) that I needed to make a few changes. Since I don't get that many users I disabled the additional cache features in XenForo's config.php, disabled that entry and then contacted my VPS provided and bumped up to 2GB memory. Now I have gotten it to a more reasonable level and still have some growth room.
     
    Adam Howard likes this.
  4. SneakyDave

    SneakyDave Well-Known Member

    Code:
    using uninitialized "xf_cache_key" variable
    
    That would appear to have been your problem You were using that variable before it was initialized by fastcgi_cache_key.

    That's just a my best guess. Nobody PM'd me on it.
     
    Adam Howard likes this.
  5. Adam Howard

    Adam Howard Well-Known Member

    :ROFLMAO:

    You're lucky. I get such things all the time. :p
     

    Attached Files:

  6. Tracy Perry

    Tracy Perry Well-Known Member

    What, you had a resource on Debian server setup and made me muddle through it by myself... how COULD you do that to such a important person as myself! :p
     
    SneakyDave and Adam Howard like this.
  7. Adam Howard

    Adam Howard Well-Known Member

    Was fairly sure I had posted a link in your direction at one time or another. :X3:

    It only covers Apache though.
    http://xenforo.com/community/resources/debian-server-setup.952/

    I was thinking of making a Debian nginx guide. Big point on making those guides though; is to explain it (word it) in such away that even a Windows noob, who doesn't even know there is a such thing as Linux, could still follow and understand it (or at least blindly follow it without understanding).
     
  8. Tracy Perry

    Tracy Perry Well-Known Member

    I'm pretty sure you did... I'm just going for my yankaward2.gif . Found that Deb is easier to deal with than Ubuntu on a base OS install setup. After finally getting my head wrapped around nginx there is NO way I could go back to Apache (unless I had no choice - like on a shared host).
     
    Adam Howard likes this.

Share This Page